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 the second variabl...
Power Apps
Unanswered

Set the second variable to true when conditions are met

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi everyone I'm having a problem with my power app.
When the conditions are verified the first variable is set to true and a sound plays, but the second variable is not set to true and the popup never shows. Does anyone has any idea how to fix this?

 

 

If(
 CountRows(colCPartilhavel) > 0 && Timer2.Value <= Timer1.Duration*2, 
 Set(gblPlaySound, true) && Set(gblShowPP, true),
 Set(gblPlaySound, false) && Set(gblShowPP, false)
)

 

Categories:
  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @Rui_Couto,

     

    To check multiple conditions in your If() you can use the 'And' operator ('&&'). This is the case in your code so that is great!

     

    In order to run multiple functions within a parameter, you will need a semicolon as a separator and not the And operator:

    If(
     CountRows(colCPartilhavel) > 0 && Timer2.Value <= Timer1.Duration*2, 
     Set(gblPlaySound, true); Set(gblShowPP, true),
     Set(gblPlaySound, false); Set(gblShowPP, false)
    )

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

  • ss20 Profile Picture
    2 on at

    Hi Laurens,

     

    can you please Help in having Unique id For each form Submission using power automate like 230727001,etc

  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @ss20,

     

    Would love to help you. 😊

     

    What I would suggest, however, is creating a new, separate topic for this question instead of commenting on a topic. If it is possible, it would be of great help should you include some context (e.g. code snippets, screenshots...). Feel free to @ tag me or other community members in your topic.

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 312

#3
Mohsin Ali Profile Picture

Mohsin Ali 252

Last 30 days Overall leaderboard