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 / Adding Condition to Se...
Power Apps
Answered

Adding Condition to Search Function

(0) ShareShare
ReportReport
Posted on by 829

HI Folks -

 

I have a the following syntax which is working great:

Search(rdAssets,"PFC-" & Right(Left(DataCardValue43.Text,9),5),"Name")

 

However, I want to add a condition to that it does the aforementioend search AND search the "Partnered" column for "Yes". 

I'm unable to get my rendition to work, can anyone assist? Thank you!

 

Categories:
I have the same question (0)
  • Verified answer
    simms7400 Profile Picture
    829 on at

    OKay, I made some progress...This seems to work:

    If(
    	CountRows(
    		Filter(
    			rdAssets,
    			"PFC-" & Right(Left(DataCardValue43.Text,9),5) in 'Name',
    			Len(PartnershipID)>0
    		)
    	) > 0, "yes","no"
    )

     

    Just a question, does that syntax act as an "AND", rather than two separate searches?  Also, is Len the est practice way of checking if a field is null?  Thanks!

  • alrezac Profile Picture
    Microsoft Employee on at

    Hi,

     

    Looking through our documentation it seems like "len" should be fine for what you are doing. The "and" operator is just adding a 2nd filter to the search overall it shouldn't be doing two searches. If you want to take a look and learn more I'll include a link below.

     

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-filter-lookup

     

    Regards,

     

    Alex

     

    -------

     

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

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 337 Most Valuable Professional

#2
11manish Profile Picture

11manish 173

#3
Valantis Profile Picture

Valantis 86

Last 30 days Overall leaderboard