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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / and, or, &, &&&, || is...
Power Apps
Answered

and, or, &, &&&, || is not working when i tried to add new condition

(0) ShareShare
ReportReport
Posted on by 51

Hi everyone,

 

So i have this application i'm currently working on and i'm wondering why it's not allowing me to add another condition to my if.

 

Please see my formula below.

 

If(
varSepSelected = 1,
'Database',
If(
varSepSelected = 2,
Filter(
'Database',
'Assigned To'.Email = User().Email
),
If(
varSepSelected = 3,
Filter(
'Database',
Status.Value = "New" && 'Assigned To'.Email = User().Email
)

)

)

)

 

and this is the new condition im trying to add on VarSepSelected=1, Database && If(User().Email="TestSubject@gmail.com", filter(Database, BU= "US123"))

 

i tried adding it to the bottom of my code and inputting ";" but it's only underlining the " ; " on red line.

 

Hope this make sense and if anyone can help, totally appreciate it.

 

Thank you 

Categories:
I have the same question (0)
  • SpongYe Profile Picture
    5,616 Super User 2025 Season 2 on at

    Hi @SecretAdmirer09 

     

    Try this:

    If(
     varSepSelected = 1,
     If(
     User().Email="TestSubject@gmail.com", 
     Filter('Database', BU= "US123"),
     'Database'
     )
     varSepSelected = 2,
     Filter('Database', 'Assigned To'.Email = User().Email),
     varSepSelected = 3,
     Filter('Database', Status.Value = "New" && 'Assigned To'.Email = User().Email),
     'Database'
    )

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

  • Verified answer
    WarrenBelz Profile Picture
    153,075 Most Valuable Professional on at

    @SecretAdmirer09 ,

    Cut down version that may also help here

    Filter(
     'Database',
     varSepSelected = 1 ||
     (
     varSepSelected = 2 &&
     'Assigned To'.Email = User().Email
     ) ||
     (
     varSepSelected = 3 &&
     Status.Value = "New" && 
     'Assigned To'.Email = User().Email
     ) ||
     (
     User().Email = "TestSubject@gmail.com" && 
     BU = "US123"
     )
    )

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard