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 / Help with a few variab...
Power Apps
Answered

Help with a few variables being used in a final decision screen

(0) ShareShare
ReportReport
Posted on by 1,625

Hello

 

Struggling with the following:

 

I have 5 reviewers, each reviewers decision is separately logged on the canvas app form, as each reviewer has there own section to complete.

 

The reviewers are set on Screen2 via the OnVisible property of the screen (a point to note for later, there may not always be 5 reviewers set, sometimes only 2)

Set(Reviewer1,Lbl_Reviewer1.Text);
Set(Reviewer2, Lbl_Reviewer2.Text);
Set(Reviewer3,Lbl_Reviewer3.Text);
Set(Reviewer4,Lbl_Reviewer4.Text);
Set(Reviewer5,Lbl_Reviewer5.Text);

Screen3 is for Reviewer1:

There are 2 scenarios I am capturing here:

if it's approved or rejected via:

Set(Reviewer1DropdownValue, DataCardValue67.Selected.Value)

 A toggles OnChange I have this:

If(DataCardValue70.Value = true, Set(FurtherReview, "Sent for further review")

 

The final screen, I am capturing the above from each reviewer if they were required to do complete a review
Firstly if there are there was not a reviewer set it will display N/A in the text box

If it was approved or rejected then it should take the variable Reviewer1DropdownValue

If it needed a further review the text box should read "Sent for further review".

 

This works correctly if I dont have 2 conditions i.e. if i was only capturing the approved/rejected status of each reviewer:

If(!IsBlank(Reviewer1), ReviewerDropdownValue, "N/A") 

But now I need to capture what I have explained above, so I have been trying the below but doesn't work:

 

If(!IsBlank(Reviewer1) && !IsBlank(Reviewer1DropdownValue), Reviewer1DropdownValue,
If(!IsBlank(Reviewer1), FurtherReview, 
 "N/A"))

  

Categories:
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Lefty :

    Your fromula looks fine.

    Currently the only error I can find is the formula is missing the ")":

    If(DataCardValue70.Value = true, Set(FurtherReview, "Sent for further review"))

    Could you tell me:

    • What is the specific content of the error report?
    • Could you show me the screenshot of the code area? (Usually the wrong place will be marked with a red wavy line)

    Best Regards,

    Bof

     

     

  • Lefty Profile Picture
    1,625 on at

    Hi @v-bofeng-msft 

     

    Yes you are right in spotting the missing ")" but I have more code in that section which I didn't paste in this is my code:

    If(DataCardValue70.Value = true, Set(FurtherReview, "Sent for further review"), Reset(DataCardValue67)&& Reset(DataCardValue73) && Reset(DataCardValue72))

     

    I think I have realised why this isnt working the way I want it to:

    If(!IsBlank(Reviewer1) && !IsBlank(Reviewer1DropdownValue), Reviewer1DropdownValue,
    If(!IsBlank(Reviewer1), FurtherReview, 
     "N/A"))

     

     Say on Reviewer1 screen, the user changes the value in Reviewer1DropdownValue to Rejected, this creates a variable as per my OnChange code on that dropdown.

    Then the users sets the toggle to true which resets the dropdown and another text box:

    If(DataCardValue70.Value = true, Set(FurtherReview, "Sent for further review")

    But the variable has already been stored by the user changing the Reviewer1DropdownValue to Rejected and this is what is displayed in the final screen as the dropdown has created a variable which active, and as per my code will display the variable as its not blank.

    How do I reset the variable in this code:

    If(DataCardValue70.Value = true, Set(FurtherReview, "Sent for further review"), Reset(DataCardValue67)&& Reset(DataCardValue73) && Reset(DataCardValue72))
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Lefty :

    Has your problem been solved?

    If the problem has been resolved, please consider marking your solution as solution and ignore my response below.

    • Coud you tell me:
      Do you mean that the value of Reviewer1DropdownValue has changed because of Reset(DataCardValue67)&& Reset(DataCardValue73) && Reset(DataCardValue72)?
    • Is Set(Reviewer1DropdownValue, DataCardValue67.Selected.Value) in the OnChange property of one of the three controls, DataCardValue67/73/72?

    If so, you can try:

    1\Delete this formula

     

    Set(Reviewer1DropdownValue, DataCardValue67.Selected.Value)

     

    2\Set the troggle's OnChange property to:

     

    Set(Reviewer1DropdownValue, DataCardValue67.Selected.Value);
    If(DataCardValue70.Value = true, Set(FurtherReview, "Sent for further review"), Reset(DataCardValue67)&& Reset(DataCardValue73) && Reset(DataCardValue72))

     

    The advantage of this is that even if the value in DataCardValue67 changes, it will not affect the variable Reviewer1DropdownValue.

    Best Regards,

    Bof

     

  • Lefty Profile Picture
    1,625 on at

    Hi @v-bofeng-msft 

     

    Nope, not solved, but close.

     

    so if delete from the OnChange of the dropdown:

    Set(Reviewer1DropdownValue, DataCardValue67.Selected.Value)

     

    And add it in with the toggle, I believe it will be the same, setting it at the dropdown, because my issue is, the variable is set to true, i need to set the Reviewer1DropdownValue variable to false at the toggle I believe?

  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Lefty :

    Do you want to reset the value of Reviewer1DropdownValue to Blank() when DataCardValue70.Value = true?

    This can be achieved by this formula:

     

    If(DataCardValue70.Value = true, Set(FurtherReview, "Sent for further review");Set(Reviewer1DropdownValue,Blank()), Reset(DataCardValue67)&& Reset(DataCardValue73) && Reset(DataCardValue72))

     

    Best Regards,

    Bof

     

  • Lefty Profile Picture
    1,625 on at

    HI @v-bofeng-msft 

     

    perfect Thanks

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard