Hi there,
I have an app whereby user's can select a delivery date from a standard date picker control, but we want to limit the amount of times people can select a delivery date to 75.
How can I implement the logic below so that, once the chosen date has been selected 75 times, the user receives an error message saying that no more bookings are available for that date?
The data coming from the app is being loaded into a Dataverse table, so could I do a LookUp count to that date column in that and if it's got more than 75 entries, show an error?
Thanks
K.
Solved! Go to Solution.
Hi @Kosenurm ,
Something like this
If(
CountRows(
Filter(
TableName,
YourUserField=User().FullName &&
YourChosenDate = YourDatePicker.SelectedDate
)
) >75,
Notify(
Your error message",
Error
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @Kosenurm ,
Something like this
If(
CountRows(
Filter(
TableName,
YourUserField=User().FullName &&
YourChosenDate = YourDatePicker.SelectedDate
)
) >75,
Notify(
Your error message",
Error
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Thanks, I am getting error "Behavior function in a non-behavior property. You can't use this property to change values elsewhere in the app" for the Notify element???
I amended your code to...
If(CountRows(Filter('TableName'.'ColumnName', yourchosendate = NewDatePicker_1.SelectedDate))>75, Notify("This date is unavailable, please choose another date"), Error));
K.
Thank you for the code it works. I was originally using it on a text label rather than the date picker itself. All good now.
Thanks again
K.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
User | Count |
---|---|
208 | |
97 | |
60 | |
54 | |
52 |
User | Count |
---|---|
257 | |
158 | |
87 | |
79 | |
65 |