Hi,
I have the following formula:
Filter(Check,task_id = LookUp(Task,task_name = CurrentTask).ID).check_name
"Check" and "Task" are SharePoint lists, VarCurrentTask is a context variable. ID, task_id, task_name and check_name are columns in the lists.
What I don't understand is why I get a warning message that this formula is not delegable on the "equals" and ID part. I don't use any non-delegable formulas, both Filter() and LookUp() should be delegable to SP, and all the columns I use are either string or integer, nothing else.
Can someone explain please why is this not delegable? And maybe suggest a way to make it delegable?
Hi @WarrenBelz
Thank you for the explanation, now it's perfectly clear.
I didn't accept the solution sooner as I did not want to close the topic because even though I had a working solution, but I still did not understand the issue completely. Now I am very happy to thank you both for help and close it.
Cheers!
Hi @CleanAndClear ,
Firstly you should accept @PowerRanger 's solution to this. To answer your question, SharePoint is not a Relational Database and Relational (secondary) queries are not Delegable - you have asked it to Filter Check and it will not do Task in the same query, however you can send it two separate Delegable queries, either as in @PowerRanger 's response, or if you do not want to trigger anything (the Variable) and simply have a Filter
With(
{
wID:
LookUp(
Task,
task_name = CurrentTask
).ID
},
Filter(
Check,
task_id = wID
).check_name
)
@PowerRanger It indeed worked.
So is it the nested lookup that is the problem? So you cannot delegate nested functions, even when the functions themselves are delegable? And you need to stay on the top level to keep delegation?
Anyway, thanks a lot!
@CleanAndClear Could you try this instead?
Set(myId, LookUp(Task,task_name = CurrentTask).ID);
Filter(Check,task_id = myId).check_name
Does this make any difference?
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.
WarrenBelz
146,645
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,997
Most Valuable Professional