cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lefty
Post Prodigy
Post Prodigy

Concatenate coming up with delegation warning on 1 form but not another

Hello,

 

I have a strange one.

This works fine on another form i've developed but working on another form, and on a single line text field from (RefNumber) SPO, I have set the following on the Default property of the the datacardvalue:

Concatenate("ABC-",Text(First(Sort(List,Created,Descending)).ID + 1 - 20, "[$-en-GB]0000"))

I get a delegation warning:

Lefty_0-1593436416817.png

 

But I dont get the same on the other form, i get no delegation warning:

Concatenate("ZY",Text(First(Sort(List,Created,Descending)).ID + 1, "[$-en-GB]0000"))

 

i've removed the -20 to make it the same, but it works on one list and not the other and im curious why i get a delegation on one but not the other?

 

13 REPLIES 13
v-bofeng-msft
Community Support
Community Support

Hi @Lefty :

Could you tell me if the two formulas use different data sources?

Could you tell me what your data sources are? 

Firstly,let me explain why you encounted delegation warning.

The key is that "First" is a non-delegable function.(Non-delegable functions)

Secondly,the reason why the similar formula did not report an error may be because the data source cannot be delegated.

If you use a non-delegable data source, no delegation warning will appear.Delegation warnings appear only on formulas that operate on delegable data sources. 

Finally,If your records are within 2000, you can ignore the delegation warning.(Changing the limit)

Best Regards,

Bof

Hello @v-bofeng-msft 

 

Could you tell me if the two formulas use different data sources? Both Data sources are SharePoint, different SharePoint lists

Could you tell me what your data sources are? 

 

Finally,If your records are within 2000, you can ignore the delegation warning.(Changing the limit)

This will probably be the case and I will increase the limit, i just could not understand why it wasn't working one 1 form and not the other when they are both different lists, but SharePoint is the data source

 

Hi @Lefty :

Increasing data row limit for non-delegable queries seems to be the only way.

Also, if you are interested in this question, could you attach screenshots of these two pieces of code? (One with warning and one without warning)I may be able to find some differences.

Best Regards,

Bof

@v-bofeng-msft 

Thanks

 

Attached are both the screen shots:

 

working and no delegation warning:

Lefty_0-1593510934532.png

 

Delegation warning appears:

Lefty_1-1593511023827.png

 

Hi @Lefty :

I am sorry to reply to you so late because I had a fever yesterday.I found some useful information contributed by @Pstork1. if there are less than 500 records in the nested data source, it seems that you can get rid of the delegation warning.(here is the link)

I think this is why one of your two formulas appears warning and one does not appear.

Best Regards,

Bof

 

Its not that you get rid of the delegation warning.  Its just that if you know the nested expression is below the data row limit then you can ignore the warning because it won't matter.  The warning will still show, but it will never be a problem.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Pstork1
Dual Super User III
Dual Super User III

I think the delegation warning is appearing because of the additional math you are doing on the ID.  Do you still get the delegation warning if you remove the '- 20' after the '.ID +1'.  Another option would be to replace it with just '- 19'



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

hi @Pstork1 

 

Yes the additional math I put in was due to the fact you cannot change the ID fields in SPO and 20 items are tests.

But to answer your question, yes the delegation warning appears regardless of the extra logic related to the math I have put in.... I cant see why it's working on one but not the other.

I've used exactly the same code but changed the list name and when I do that on the new form, I get the delegation warning.

Pstork1
Dual Super User III
Dual Super User III

Not sure why it works on the one and not the other, but First() will normally have a delegation warning.  Have you considered using Lookup() instead?  That is fully delegable and normally provides the same result as First(). 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (53,184)