cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
skylitedave
Kudo Kingpin
Kudo Kingpin

startswith delagation warning sharepoint

Why am I getting a delagation warning using StartsWith in a filter against a single line of text in a SharePoint list?

 

Documentation says that Startswith is delegable ( is that a word) when using with a Filter in SharePoint

 

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/delegation-list

 

Here is the statement that is throwing the warning....

 

Filter(Products, StartsWith(Code,TextInput1.Text))

 

Documentation says this should work so what's up with the warning?  Can you use Startswith within a filter against a single line of text in a SharePoint list or not??????

12 REPLIES 12
anees
Power Apps
Power Apps

@skylitedave you should not be seeing the warning. I am unable to see this on our side.

 

Is it limiting your results too or is it just the warning but working as expected?

 

Can you paste some screenshots and a session id?

 

Thanks

Anees

 

 

Screenshots attached

 

Have not loaded list with more than 500 records but I could

 

This is in the Items Property of the ComboBox

      Filter(Products, StartsWith(Title,TextInput1.Text))

 

 

Session ID: 0bb999d8-2719-4ebd-a73b-899601e5b8f5
PowerApps 3.18072.29

 

v-xida-msft
Community Support
Community Support

Hi @skylitedave,

 

I have made a test and the issue is confirmed on my side. The screenshot as below:1.JPG

 

 

But when I add a Gallery control, and set the Items property of the Gallery control to following formula:

 

Filter('20180714_case2',StartsWith(TaskName,TextInput1.Text))

The Delegation warning doesn't show up.

 

 

As an alternative solution, please take a try with the following workaround:2.JPG

 

 

Set the OnSelect property of the Combo box control to following formula:

 

ClearCollect(Collection1,Filter('20180714_case2',StartsWith(TaskName,TextInput1.Text)))

Note: The '20180714_Case2' represents the SP list data source within my app, the TaskName is a column in my SP list. On your side, you should type the following formula:

 

ClearCollect(Collection1,Filter(Products, StartsWith(Code,TextInput1.Text)))

 

 

 

Set the Items property of the Combo box control to following:

 

Collection1

Set DisplayFields property to following:

 

 

["TaskName"]

Note: The ["TaskName"] represents the column of your SP list that you want to display within your Combo box control. If you want to display Column1 within your Combo box control, please type the following formula within DisplayFields property:

["Column1"]

The GIF image as below:Test1.gif

 

 

 

More details about Combo box control within PowerApps, please check the following article:

Combo box control

 

 

Best regards,

Kris

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@skylitedave the warning is actually from the combo box and not about the Filter function. @v-xida-msft has a workaround if you wish to avoid that warning.

 

@FilipK can you help provide more details?

 

Thanks

Anees

I think the warning IS from the formula.  It is warning about wheter delegation can be used with this forumla.  What is the data source being used here?  I wander if it is related to the StartsWith method within...

 

 

- not filipk@microsoft.com, please private message me if you can't share with everyone

Hi

 

The datasource is a sharepoint list

 

The documentation on delegation states that Startswith can be used with SharePoint Lists

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/delegation-list

 

It states that when accessing SharePoint lists the follwoing is supported and delegable 

Filter 

Startswith

 

I think I see the issue

 

This IS supported in the Items of a gallery within my app


          Filter( Accounts, StartsWith(Title, Account_List_Searchbox.Text))

 

But I am getting an error when using the Filer and Starts with in the items in a ComboBox ( i was trying to set the items in a combobox)

 

makes me think this is a spurious message that was overlooked when support was added for startswith in a sharepoint list

 

Action Item to staff - See if you can reproduce this issue in the items of a ComboBox

 

 I do have a better workaround the the collection suggestion - I don't like the idea of loading thousands of items into a colllection

 

You can use a LookUp in SharePoint and make the connection a "hard" connection in Sharepoint and then use a combobox againt that lookup column.  We were avoiding the Lookup and making this connection manually in PowerApps using a Filter and Startswith for the items in a Combobox because we were getting some issues with workflow in SharePoint with a lookup column.  To get around this, we added a lookup in SharePoint to make the hard connection between the lists and then used the lookup in PowerApps as a combobox and set the values in SharePoint.  We dont use the lookup in SharePoint for anything but getting around this issue in the PowerApps app...   hope that all made sense...

 

Bottom line....  If you need to link 2 lists in SharePoint then use a lookup in SharePoint and then the Combobox within a datacard in PowerApps and it is easy and clean..  The Lookup can just be a utility field in SharePoint to give you some nice functionality in the PowerApp using the ComboBox and Searchto link 2 lists ...

 

I am having issues with delegation with search, filter and startswith in gallery with source sharepoint list as described above. Except for creating lookup inside sharepoint list Ive tried everything. Still getting delegation warning and cut-short 500 result in gallery.

Also getting delegation warning with combobox workaround.

 

Search against single-line text column (sharepoint list source) works, but multiple-line text column throws delegation.

 

Any reflections on what issues can be ?

Hi, 

 

I have been reading a lot of documentation about delegation for sharepoint and I came across this thread. 

I am having the same problem. I have a button in my powerapp which is intended to populate a collection with sharepoint items based on a defined search criteria.

Even if I use Filter or other functions that are supposed to be delegated to Sharepoint, I still get the delegation warning and I see my search is limited to the first 2000 records (yes, I have changed that setting in my powerapp as an attempt to solve the issue).

 

Has this thread ever been solved or any ideas on how to solve it? I tried every possible thing such as replacing the query to use StartsWith (which is also supposed to be delegated), etc. As soon as I reference my search column, I get a delegation warning. 

 

See my current attempt to solve the problem and the delegation warning. Samling3 is a collection, Konto is the SP data source

 

Skärmklipp.JPG

 

Thank you so much for any help. 

 

Kind regards

Ozzie

Try adding an index to the field in the SharePoint List Settings and I think you will resolve this issue

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

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (28,931)