My current expression in Valid If -
COUNT(FILTER(โChildโ, AND([_THIS] = [Parent].[Ride],[Date] = [Parent].[Date]))) <1
Here I want to give multiple conditions with values using OR () like below but its not working,
OR (
COUNT(FILTER(โChildโ, AND([Ride] = "1 Hour Ride (09:00 AM to 10:00 AM)",[Date] = [Parent].[Date]))) <1,
COUNT(FILTER(โChildโ, AND([Ride] = "Dinner Cruise (06:00 PM to 08:00 PM)",[Date] = [Parent].[Date]))) <1
)
Please assist me on the above . @Steve
Solved! Go to Solution.
Hi Steve,
Happy New Year wishes and hope you are doing great !!
I really appreciate your help @Steve and thanks alot for all the assistance and help you provided me on this.
Just a note :
I have tried the solution given by you and it was giving error in select(), However your expression has created an idea for me and i have tried the same thing using IFS() so the expression I created is as mentioned below and it worked perfectly -
COUNT(FILTER(โChildโ, AND([_THIS] = [Parent].[Ride],[Date] = [Parent].[Date]))) <
IFS([Ride]=โ1 Hour Ride (09:00 AM to 10:00 AM)โ,10,
[Ride]=โ1 Hour Ride (02:30 PM to 03:30 PM)โ,10,
[Ride]=โDinner Cruise (06:00 PM to 08:00 PM)โ,16,
[Ride]=โDinner Cruise (08:00 PM to 10:00 PM)โ,16)
Please describe what you want in plain language, without using any AppSheet terms.
Hi @Steve ,
Thanks for the replyโฆ and hope you are doing good !!
In the Enum column [Ride] in Valid_IF using OR() function I am passing two conditional expressions but its not workingโฆ Am I doing the right approach?
Please assist, I can add you in my app also so that you can take better overview.
Please describe what you want in plain language, without using any AppSheet terms.
Hi @Steve
Thanks for the reply and hope you are well !
I have 4 (four) rides and those are : 1) โ1 Hour Ride (09:00 AM to 10:00 AM)โ, 2) โ1 Hour Ride (02:30 PM to 03:30 PM)โ, 3) โDinner Cruise (06:00 PM to 08:00 PM)โ, 4) โDinner Cruise (08:00 PM to 10:00 PM)โ.
I want to limit the total data entries in the child table for a particular Ride on a particular Date to count suppose 10 .
For example: When I select a ride and a date from the date picker and start entering the data > the max entries should be limited to suppose 10 or any number. And if suppose 10 entries are done it will ask to select the next date.
So each ride for each date will have only 10 entries allowed.
Please Kindly help an expression for this condition.
Thanks
Javed
Try this:
OR(
ISBLANK([Date]),
(
COUNT(
FILTER(
"Child",
AND(
([Ride] = [_THIS]),
([Date] = [_THISROW].[Date])
)
)
)
< 10
)
)
Hi @Steve
Thanks for the reply and hope you are doing good !!
Please I forgot to mention one part and really need help for the below one -
As I have 4 (four) rides and those are : 1) โ1 Hour Ride (09:00 AM to 10:00 AM)โ, 2) โ1 Hour Ride (02:30 PM to 03:30 PM)โ, 3) โDinner Cruise (06:00 PM to 08:00 PM)โ, 4) โDinner Cruise (08:00 PM to 10:00 PM)โ.
Basically, when I select ride #1 and ride #2 and a date from the date picker and start entering the data > the max entries should be limited to suppose count โ16โ.
And
when I select ride #3 and ride #4 and a date from the date picker and start entering the data > the max entries should be limited to suppose count โ26โ.
Please help an expression for the above condition.
Thanks
Javed
Hi @Steve
Hope you are doing good !! and belated merry christmas wishes !!
Please update on the above queryโฆ
Thanks & Regards
Javed
That information would have been helpful initially. Iโve already spent enough time with your problem. Please demonstrate that youโve tried to use the suggestion I provided to solve your problem.
Hi @Steve
Hope you are doing well !
I really appreciate and grateful to you so far you have helped me a lot for the solution โฆ
The solution provided by you in 7th comment is not working, so I just modified a bit on it and tried the below expression
(COUNT(FILTER(โChildโ, AND([_THIS] = [Parent].[Ride],[Date] = [Parent].[Date]))) < 10)
Itโs working But still I re-analyzed and finally, I require the functionality to be like below mentioned and I really need your help on this as I want to limit the count for individual/each ride and for each date.
"
As I have 4 (four) rides and those are : 1) โ1 Hour Ride (09:00 AM to 10:00 AM)โ, 2) โ1 Hour Ride (02:30 PM to 03:30 PM)โ, 3) โDinner Cruise (06:00 PM to 08:00 PM)โ, 4) โDinner Cruise (08:00 PM to 10:00 PM)โ.
Basically, when I select ride #1 and ride #2 and a date from the date picker and start entering the data > the max entries should be limited to suppose count โ16โ.
And
when I select ride #3 and ride #4 and a date from the date picker and start entering the data > the max entries should be limited to suppose count โ26โ.
"
Thanks & Regards,
Javed
OR(
ISBLANK([Date]),
(
COUNT(
FILTER(
"Child",
AND(
([Ride] = [_THIS]),
([Date] = [_THISROW].[Date])
)
)
)
< SELECT(
[Ride],
"1 Hour Ride (09:00 AM to 10:00 AM)โ, 10,
โ1 Hour Ride (02:30 PM to 03:30 PM)โ, 10,
โDinner Cruise (06:00 PM to 08:00 PM)โ, 16,
โDinner Cruise (08:00 PM to 10:00 PM)", 16,
0
)
)
)
Hi Steve,
Happy New Year wishes and hope you are doing great !!
I really appreciate your help @Steve and thanks alot for all the assistance and help you provided me on this.
Just a note :
I have tried the solution given by you and it was giving error in select(), However your expression has created an idea for me and i have tried the same thing using IFS() so the expression I created is as mentioned below and it worked perfectly -
COUNT(FILTER(โChildโ, AND([_THIS] = [Parent].[Ride],[Date] = [Parent].[Date]))) <
IFS([Ride]=โ1 Hour Ride (09:00 AM to 10:00 AM)โ,10,
[Ride]=โ1 Hour Ride (02:30 PM to 03:30 PM)โ,10,
[Ride]=โDinner Cruise (06:00 PM to 08:00 PM)โ,16,
[Ride]=โDinner Cruise (08:00 PM to 10:00 PM)โ,16)
Whoops! Should have been SWITCH()
, not SELECT()
. Here it is corrected:
OR(
ISBLANK([Date]),
(
COUNT(
FILTER(
"Child",
AND(
([Ride] = [_THIS]),
([Date] = [_THISROW].[Date])
)
)
)
< SWITCH(
[Ride],
"1 Hour Ride (09:00 AM to 10:00 AM)โ, 10,
โ1 Hour Ride (02:30 PM to 03:30 PM)โ, 10,
โDinner Cruise (06:00 PM to 08:00 PM)โ, 16,
โDinner Cruise (08:00 PM to 10:00 PM)", 16,
0
)
)
)
Outstanding! Very well done!
User | Count |
---|---|
37 | |
31 | |
29 | |
22 | |
18 |