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 / Would like to search u...
Power Apps
Answered

Would like to search using contains or exact instead of StartWith()

(0) ShareShare
ReportReport
Posted on by 5

Good Afternoon!

 

I am writing below formula to make search my gallery items , currently i am using startwith() for the building, campus, unit, and floor but for the floor, since our facility has 1-15 floors, the Startswith() function for the floor is pulling 1st,10th,11th,12th,13th,14th, and 15th floor. Is there an alternative function i can use for the floor instead of Startwith()? Or perhaps delegate this exact floor for the search?

 

SortByColumns(

Filter([@'Physician Workstation and Technology Rounding'], StartsWith(Campus.Value, ddCampus.Selected.Value)
,StartsWith(Building.Value, ddBuildings.Selected.Result),StartsWith(Unit.Value, ddUnit.Selected.Result),StartsWith(Flr.Value, ddFlr.Selected.Result)), "Rounding_x0020_Date", If(SortDescending1, Descending, Ascending)

)

 

hoping to choose exactly floor 1 or floor 10 and so on for the search

 

hernandm_0-1674166369969.png

 

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,956 Most Valuable Professional on at

    Hi @hernandm ,

    Why are you using StartsWith when you have the exact value in all of your drop-downs ?

    SortByColumns(
     Filter(
     [@'Physician Workstation and Technology Rounding'], 
     Campus.Value = ddCampus.Selected.Value &&
     Building.Value = ddBuildings.Selected.Result &&
     Unit.Value = ddUnit.Selected.Result &&
     Flr.Value = ddFlr.Selected.Result
     ), 
     "Rounding_x0020_Date", 
     If(
     SortDescending1, 
     Descending, 
     Ascending
     )
    )

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • hernandm Profile Picture
    5 on at

    Oh my goodness. I am such a dummy. This fixed my issue. I don't know why i thought i had to use the Startswith() Function. putting in the direct value was much better and fixed my issue completely. Thank you so much @WarrenBelz!

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 232 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 202 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard