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 Apps
Answered

FORMULA

(0) ShareShare
ReportReport
Posted on by 162

Good day how to fix my formula.

 

If(LookUp(SPList,, tag="B1",tag) And LookUp(SPList, tag_rep="YES",Tag_rep),RGBA(130, 35, 119,1),
If(LookUp(SPList,, tag="B1",tag) And LookUp(SPList, tag_rep="YES",Tag_rep),RGBA(0,87,63,1),RGBA(0,0,0,0)))

 

What I want is when tag="B1" And tag_rep = "YES" Then the color is PURPLE else if tag = "B1" and tag_rep="" then GREEN

Categories:
  • Verified answer
    Ethan_009 Profile Picture
    4,840 Moderator on at

    Hi @DHAGZ ,

     

    I assume your tag and tag_rep are variables or instance of an item having same name as column name,

    Try the following code:

    With(
     {
     TagMatch: LookUp(SPList,tag="B1",ThisRecord.tag),
     RepMatch: LookUp(SPList, tag_rep="YES",ThisRecord.Tag_rep)
     },
     If(TagMatch = "B1" && RepMatch = "YES",
     RGBA(130, 35, 119,1),
     If(TagMatch = "B1" && RepMatch = "YES"
     RGBA(0,87,63,1),
     RGBA(0,0,0,0)
     )
     )
    )

     

    Hope this helps

  • DHAGZ Profile Picture
    162 on at

    Thanks it helps 🙂 .

     

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 226 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 191 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 167

Last 30 days Overall leaderboard