Forum Discussion
Delegation Warning
- 4 years ago
Thank you both for responding back, much appreciated and well done to you both for sorting my delegation out š
The formula does work perfectly with data row limit set to 1 which is exactly what I wanted and delegation has now disappeared.
However, is the formula limited to how many times it can be used or written? I have 13 item to select from in the Column1NameStatus.Value ie I have 13 item to select from in (1) āPublishedā, (2) āLateā, (3) āNot Arrivedā (4) āArrived Lateā (5) āDepartedā and so on, when the formula get written 7 times, its okay but after this point it goes in to an error where the warning states that I donāt have permission to use the Gallery!!
Any idea why or advice please?
- 4 years ago
Thank you both for responding back, much appreciated and well done to you both for sorting my delegation out š
The formula does work perfectly with data row limit set to 1 which is exactly what I wanted and delegation has now disappeared.
However, is the formula limited to how many times it can be used or written? I have 13 item to select from in the Column1NameStatus.Value ie I have 13 item to select from in (1) āPublishedā, (2) āLateā, (3) āNot Arrivedā (4) āArrived Lateā (5) āDepartedā and so on, when the formula get written 7 times, its okay but after this point it goes in to an error where the warning states that I donāt have permission to use the Gallery!!
Any idea why or advice please?
- 4 years ago
@EddieE ,
When I add another selection from my choice value to the Item formula, I get the following message , I don't have permission to view this data. Server Response: The Name of My List failed, the response is not in a JSON format.
Not a problem any longer, as you advised, Iāve added a dropdown to my gallery and it works perfectly, I will continue to monitor the new formula and hopefully I can cross this one of the list of things to do.
Well done and thank you so much for your time, very much appreciated your help and advice. Brilliant keep up the good work you provide.
So you can't do datediff / add etc. to SharePoint dates with delegation but instead of doing the calculation that way, just do it on the other end? So instead of
'Part 1 Planned Start Time' - 0.5 < Now() do: 'Part 1 Planned Start Time' < Now() + 0.5
This essentially is the same thing, and you can do the calculation on that side of the condition.
Also instead of doing +0.5 it's easier to understand using DateAdd(), so if you want 30 minutes do
'Part 1 Planned Start Time' < DateAdd(Now(),30,Minutes)
'Part 1 Planned Finish Time' > DateAdd(Now(),15,Minutes)
Easier to read and understand etc. I think this should get what you're looking for.
- Syndicate_Admin4 years agoAdministrator
Well done to @cwebb365 , he has solved your delegation issue for you. I must admit, I haven't read over the MS Delegation docs for awhile and was also typing my answers late at night on my phone without checking said Docs - hence I was a little out of practice! It's nice be schooled and re-learn what has been lost š
The reason this works is because you are sending a constant (ie DateAdd( Now(), 30, Minutes) ) to SharePoint instead of trying to do some maths on a column value (ie a Date value) which isn't delegable. The part in the Delegation docs where this is mentioned is here, which states:
You can also use portions of your formula that evaluate to a constant value for all records. For example, Left( Language(), 2 ), Date( 2019, 3, 31 ), and Today() don't depend on any columns of the record and, therefore, return the same value for all records. These values can be sent to the data source as a constant and won't block delegation.
You can also check if this formula will return all of your required records by changing the Data Row Limit in Settings to 1. Then if more than 1 record should be returned then you will see all of the records in your gallery, if the formula works - just another good tip.
So, your full working formula looks like:
Sort( Filter( yourListName, Column1NameStatus.Value = "Published" && 'Part 1 Planned Start Time' < DateAdd( Now(), 30, Minutes) && 'Part 1 Planned Finish Time' > DateAdd( Now(), -15, Minutes) ), 'Part 1 Planned Start Time', Ascending )Thanks to @cwebb365 for getting me to do some homework š