Hi,
I currently have a problem with a piece of code I used. It gives me a delegation warning, I'm trying to find a solution for it but without succces so far. The following piece of code can be found below.
Filter(dif; Text(ID) = LookUp(PN_DIF_Status; Text(SelectedPN) = Partnumbers1.Value; DIF0.Value))
I found something on internet saying that you have to set a global variable and then using the Filter function. The code can be found below
Set(variable1, LookUp(PN_DIF_Status; Text(SelectedPN) = Partnumbers1.Value; DIF0.Value))
Filter(dif, Text(ID)=variable1)
However, this also seems not the fix the problem. I still receive the delegation warning. FYI the tables 'DIF' and 'PN_DIF_Status' are both contains more than 10000+ rows
Anyone out there have a idea how to get rid of the delegation warning for the Filter function? Your help is much appreciated!
Solved! Go to Solution.
Thanks @tommyvtran1 ,
I believe you need to go the other way to avoid the Delegation issue
With(
{
wDIFO:
LookUp(
PN_DIF_Status;
SelectedPN = Value(Partnumbers1.Value)
).DIF0.Value
};
Filter(
dif;
ID=wDIFO
)
)
NOTE - You cannot use a non-delegable query on 10,000 records. A numeric query is Delegable, so the With() statement should isolate the value you need for the filter.
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 @tommyvtran1 ,
The 10,000 rows are not an issue if a delegable filter can isolate the value you need to lookup, so a similar concept using the With() statement may work for you.
With(
{
wDIFO:
LookUp(
PN_DIF_Status;
Text(SelectedPN) = Partnumbers1.Value
).DIF0.Value
};
Filter(
dif;
Text(ID)=wDIFO
)
)
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!
I think the issue here is two-fold, the first being that you are trying to convert a column to Text(), which means its trying to go through all records and convert them to text in order to perform the lookup, so that's immediately not delegable, then you are doing Something.Value as the comparative, when you should use a variable for this as you mentioned.
So, the OnChange for Partnumbers1 should be set to:
Set(ActualPartNumber, Value(Partnumbers1.Value));
Set(LookUpValue, LookUp(PN_DIF_Status; SelectedPN = ActualPartNumber; DIF0.Value) );
Then you can set your formula to this:
Filter(dif; ID = LookUpValue)
Could you try this and let me know how that goes for you?
Cheers,
Sancho
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
How does this part of the code work, as 'Partnumbers1' is not recognized in this setting
Set(ActualPartNumber, Value(Partnumbers1.Value));
Is SelectedPN a Numeric or Text Value and how many items are in the list PN_DIF_Status ?
I assume PartNumbers is a Choice field?
Hi,
SelectedPN is a Numeric Value and PN_DIF_Status has 10 columns with 10000+ rows. "PartNumbers1" is the name of the column in the list "PN_DIF_Status".
Thanks @tommyvtran1 ,
I believe you need to go the other way to avoid the Delegation issue
With(
{
wDIFO:
LookUp(
PN_DIF_Status;
SelectedPN = Value(Partnumbers1.Value)
).DIF0.Value
};
Filter(
dif;
ID=wDIFO
)
)
NOTE - You cannot use a non-delegable query on 10,000 records. A numeric query is Delegable, so the With() statement should isolate the value you need for the filter.
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 @tommyvtran1 ,
Just checking if you got the result you were looking for on this thread. Happy to help further if not.
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.
User | Count |
---|---|
183 | |
124 | |
88 | |
45 | |
43 |
User | Count |
---|---|
254 | |
160 | |
128 | |
81 | |
73 |