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 Multiple Variables...
Power Apps
Answered

Set Multiple Variables with IF, THEN Statement

(0) ShareShare
ReportReport
Posted on by 78

Hello.  Is my syntax below correct?  I seem to only be getting the true results and not the false.

 

If
(
varCreatedByGM = "true",
Set(varPPQStatus, "VP Scope Review")&&
Set(varCurrentOwner, varVP)&&
Set(varEmailRecipient, varVP_Email)&&
Set(varGMDec, "Approve Scope")&&
Set(varGMDecDate, Today())&&
Set(varCurAprID, varVPId)&&
Set(varSelected, varRetailCount+varServicesCount+varFoodCount+varFuelCount)&&
Set(varRetailResponse, 0)&&
Set(varServicesResponse, 0)&&
Set(varFoodResponse, 0)&&
Set(varFuelResponse,0)
,(
Set(varPPQStatus, "GM Scope Review")&&
Set(varCurrentOwner,varGM)&&
Set(varEmailRecipient, varGM_Email)&&
Set(varCurAprID, varGMID)&&
Set(varSelected, varRetailCount+varServicesCount+varFoodCount+varFuelCount)&&
Set(varRetailResponse, 0)&&
Set(varServicesResponse, 0)&&
Set(varFoodResponse, 0)&&
Set(varFuelResponse,0)
));

 

Thank you

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

    Now I feel silly.  I saw my mistake as soon as I hit the submit button. I had too many parenthesis.

     

    If
    (
    varCreatedByGM = "true",
    Set(varPPQStatus, "VP Scope Review")&&
    Set(varCurrentOwner, varVP)&&
    Set(varEmailRecipient, varVP_Email)&&
    Set(varGMDec, "Approve Scope")&&
    Set(varGMDecDate, Today())&&
    Set(varCurAprID, varVPId)&&
    Set(varSelected, varRetailCount+varServicesCount+varFoodCount+varFuelCount)&&
    Set(varRetailResponse, 0)&&
    Set(varServicesResponse, 0)&&
    Set(varFoodResponse, 0)&&
    Set(varFuelResponse,0)
    ,
    Set(varPPQStatus, "GM Scope Review")&&
    Set(varCurrentOwner,varGM)&&
    Set(varEmailRecipient, varGM_Email)&&
    Set(varCurAprID, varGMID)&&
    Set(varSelected, varRetailCount+varServicesCount+varFoodCount+varFuelCount)&&
    Set(varRetailResponse, 0)&&
    Set(varServicesResponse, 0)&&
    Set(varFoodResponse, 0)&&
    Set(varFuelResponse,0)
    );

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 610

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard