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 / Set value based on ano...
Power Apps
Answered

Set value based on another field

(0) ShareShare
ReportReport
Posted on by 30

I have a powerapps custom form and the "zip code" is an text free entry based on zip code the county name should populate on "Region" Field. Below formula in powerapps is not working. I need OR condition.

 

If(DataCardValue6.Mode='11727'||'11324', set(DataCardValue8)='Suffolk County',set(DataCardValue8)='None')

 

Please advise. 

I have the same question (0)
  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @alpatel ,

     

    Could you please share more details about your scenario? Do you have another list where contains county names along with unique zip codes? If there is a list it will be quite simple.

     

    I assume the list is named Counties, with county names in Title column and zip codes in ZipCode column. Both columns are of type text. So, Text property of DataCardValue8: 

     

    Coalesce(LookUp(Counties, ZipCode = DataCardValue6.Text, Title),"None")

     

     

    If you do not have the Counties list, according to the formula you give, please try below in Text of DataCardValue8:

     

    If(DataCardValue6.Text="11727"||DataCardValue6.Text="11324", "Suffolk County","None")

     

     

    Best regards,

  • alpatel Profile Picture
    30 on at

    We don't want to do lookup as user have to maintained the list. 

     

    I used option second code and that worked beautifully. 

    Thank you so much for your quick response. 

     

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 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard