cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Searching gallery based on input box = syntax error and delegable warning sign

Hi all,

 

I wanted to filter my gallery based on the search parameter text box. My datasource  (Register) is a SharePoint list.

 

Initially i set the search based on the formula. It works perfectly but i got the delegation warning label.

 

If( IsBlank(TextInput3), Register, Search( Register, TextInput3.Text ,"Title" ))

 

I then set the following to my gallery control but got a error instead. I was following the example cited in MS doc

 

If (IsBlank(TextInput3), Register, Filter( Register, StartsWith( 'Created By' ,TextInput3.Text))

Can someone help with this? Thank you !

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: Searching gallery based on input box = syntax error and delegable warning sign

Hi @Boon-1 :

First, let me explain why your first code is not delegable.

The point is search is not delegable for SharePoint.

I think this link will help you a lot:

Power Apps delegable functions and operations for SharePoint

Second,the problem with your second code is the data type.

'Created By' is a record which inculde 'Claims','DisplayName','Email'……ect.But the parameter in the StartWith function must be of type text.Syntax

Finally,I suggest you try this code:

 

If( IsBlank(TextInput3), Register, Filter( Register, StartsWith(Title,TextInput3.Text)||StartsWith('Created By'.DisplayName,TextInput3.Text)||StartsWith('Created By'.Email,TextInput3.Text)))

 

Use OR operator to connect conditions.

Best Regards,

Bof

 

 

View solution in original post

Highlighted
Microsoft
Microsoft

Re: Searching gallery based on input box = syntax error and delegable warning sign

Hi @Boon-1 :

Text() is not delegable.Pleast try:

If(IsBlank(TextInput3), Register,
Filter(Register, StartsWith('Created By'.DisplayName,TextInput3.Text)||
                       ID=Value(TextInput3.Text)||
                       StartsWith('Activity',TextInput3.Text)
)
)

Best Regards,

Bof

View solution in original post

5 REPLIES 5
Highlighted
Community Champion
Community Champion

Re: Searching gallery based on input box = syntax error and delegable warning sign

Try

If (IsBlank(TextInput3), Register, Search( Register, TextInput3.Text, "Created By"))

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Highlighted
Microsoft
Microsoft

Re: Searching gallery based on input box = syntax error and delegable warning sign

Hi @Boon-1 :

First, let me explain why your first code is not delegable.

The point is search is not delegable for SharePoint.

I think this link will help you a lot:

Power Apps delegable functions and operations for SharePoint

Second,the problem with your second code is the data type.

'Created By' is a record which inculde 'Claims','DisplayName','Email'……ect.But the parameter in the StartWith function must be of type text.Syntax

Finally,I suggest you try this code:

 

If( IsBlank(TextInput3), Register, Filter( Register, StartsWith(Title,TextInput3.Text)||StartsWith('Created By'.DisplayName,TextInput3.Text)||StartsWith('Created By'.Email,TextInput3.Text)))

 

Use OR operator to connect conditions.

Best Regards,

Bof

 

 

View solution in original post

Highlighted
Helper III
Helper III

Re: Searching gallery based on input box = syntax error and delegable warning sign

Hi Bof,

 

Thanks it works ! How can search I by unique ID of Sharepoint list? I tring the following:

 

If(IsBlank(TextInput3), Register,
Filter(Register, StartsWith('Created By'.DisplayName,TextInput3.Text)||
                       StartsWith( Text(ID),TextInput3.Text)||
                       StartsWith('Activity',TextInput3.Text)
)
)

 

But i got the warning error: Delegation warning: The filter part of the label might not work correctly on large data sets and a double blue line underscore

Highlighted
Microsoft
Microsoft

Re: Searching gallery based on input box = syntax error and delegable warning sign

Hi @Boon-1 :

Text() is not delegable.Pleast try:

If(IsBlank(TextInput3), Register,
Filter(Register, StartsWith('Created By'.DisplayName,TextInput3.Text)||
                       ID=Value(TextInput3.Text)||
                       StartsWith('Activity',TextInput3.Text)
)
)

Best Regards,

Bof

View solution in original post

Highlighted
Helper III
Helper III

Re: Searching gallery based on input box = syntax error and delegable warning sign

Hi Bof,

 

Thank you ! It works now as intended.

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,405)