web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Why does my Search ret...
Power Apps
Answered

Why does my Search returns result from Gallery but Filter StartsWith does not?

(0) ShareShare
ReportReport
Posted on by 31

Why does my Search returns result from Gallery but Filter StartsWith does not?

 

I have made a List called Expense Record List (all in text columns to avoid delegation issues, no lookup, no choice, no calculated column). Data input is done in a Form in the PowerApp.

 

I have 2 galleries, 1st gallery is called Project List, 2nd Gallery is called Project Detailed Expense.

 

So, what result the user selects in the 1st gallery gets to set to a variable called varProjectExp.

I've tested it with a text label called Test_varProjectExp by text=varProjectExp, and it returns the correct value based on selection of the first gallery.

 

Then, in the 2nd gallery, Items should be displayed from the Expense Record List. based on the value of varProjectExp (which is the project name selected in the first gallery), this is done by varProjectExp= text values entered in a column called 'ProjectRelated' in the Expense Record List.

I've double checked my list setting that 'ProjectRelated column is indeed a Text column.

 

Now, my problem is, I can get result from the 2nd gallery when I put the following code by using Search in the gallery Item:

Search('Expense Record',varProjectExp,"ProjectRelated")

 

But, because this gives me delegation warning which is something I'm trying to avoid, so I went with Filter and StartsWith as shown below:

 

Filter('Expense Record',StartsWith("ProjectRelated",varProjectExp))

 

However, this code returns blank, it doesn't show any item matching to my filter.

 

The test TextLabel mentioned above Test_varProjectExp still returns the varProjectExp value which is one of the project's name present in the ProjectRelated column, and it's correct as Search function was showing the relevant item, but somehow my Filter and StartsWith just doesn't work......

 

Help anyone?

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    156,327 Most Valuable Professional on at

    Hi @rybnzdev ,

    You just need to drop the quotes for the correct syntax

    Filter(
     'Expense Record',
     StartsWith(
     ProjectRelated,
     varProjectExp
     )
    )

    however what is in varProjectExpense ?

     

    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.

    Visit my blog Practical Power Apps

  • rybnzdev Profile Picture
    31 on at

    all sorted now, it's actually due to PowerApps and SharePoint List data lag, I had the codes correct yesterday before I added " ", coz PowerApps wasn't synchronising after I've stupidly renamed a column, and didn't even work after I've refreshed the app, and refreshed the connection.
    I guess I just have to be careful with renaming columns in future or wait out.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 181 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 112 Super User 2026 Season 2

Last 30 days Overall leaderboard