Hello Everyone,
How can i avoid a deligation warning in the logic I used to filter any booked days and disable that day.
I really appreciate any help you can provide.
DisplayMode Property of Label within my Calader;
If(Countrows(filter('ASK FORM', 'Appointment Date',DateAdd(_firstdayInView,ThisItem.Value))) >0, DisplayMode.Disabled,Edit)
Solved! Go to Solution.
In your case I have a better idea.
Why check if CountRows is greater than zero? It's easy to just check instead, for whether or not there is even one Record at all present in the data source of the criteria given (and this should be delegable) - like this:
If(!IsBlank(LookUp('ASK FORM', 'Appointment Date',DateAdd(_firstdayInView,ThisItem.Value))), DisplayMode.Disabled,Edit)
or perhaps you might prefer to not negate the IsBlank and instead just swap the order you originally gave of the DisplayMode arguments of the If function, and have IsBlank without the negation, like this:
If(IsBlank(LookUp('ASK FORM', 'Appointment Date',DateAdd(_firstdayInView,ThisItem.Value))), Edit,Disabled)
See if it helps @Nu-Azu
I believe CountRows is likely to be the one that is not a delegable function, I believe it might not be a delegable function on any data source, perhaps except for Dataverse with some caveats.
Your options are:
1. Rewrite the formula so it does not use CountRows. In your case, I am not sure how to do this off the top off my head based on the information you provided so far. Perhaps someone else could advise you on this.
One thing I might advise you on, is if possible in your case, you can try to avoid the Filter (if possible), and try to use ThisItem instead if you happen to be inside a Form or Gallery control and the data source happens to be already the same one for which you are already operating directly on from the Form or Gallery. This may help in some cases.
2. If you are sure (or can make arrangements to be sure) that the argument which CountRows is operating on (i.e. the Filter you gave), always is expected to return a number that is equal to or less than the data row limit then you can safely just ignore the warning.
The data row limit can be found in Settings -> General (scroll down)-> Data row limit. The default data row limit is 500, the max it can be set to is 2000.
See if it helps @Nu-Azu
In your case I have a better idea.
Why check if CountRows is greater than zero? It's easy to just check instead, for whether or not there is even one Record at all present in the data source of the criteria given (and this should be delegable) - like this:
If(!IsBlank(LookUp('ASK FORM', 'Appointment Date',DateAdd(_firstdayInView,ThisItem.Value))), DisplayMode.Disabled,Edit)
or perhaps you might prefer to not negate the IsBlank and instead just swap the order you originally gave of the DisplayMode arguments of the If function, and have IsBlank without the negation, like this:
If(IsBlank(LookUp('ASK FORM', 'Appointment Date',DateAdd(_firstdayInView,ThisItem.Value))), Edit,Disabled)
See if it helps @Nu-Azu
Thank you! this solved the Issue 🙂
User | Count |
---|---|
124 | |
87 | |
86 | |
75 | |
69 |
User | Count |
---|---|
214 | |
181 | |
139 | |
96 | |
83 |