0

I have a PowerApps form with a Workflow that keeps firing off multiple emails because of how the fields are set up. I'd like to have one text field that will change its value based on three other separate drop-down fields. Basically it's a Status text field.

This is what I'd like to achieve: PM Approval Drop-Down equals Approved, Set text field to "PM Approved". Then, PMO Approval Drop-Down equals Approved, Set the text field to "PMO Approved", then Project Sponsor Approval Drop-Down equals Approved, Set the text field to "Sponsor Approved". I get the logic, but can't translate it to power apps. The text field will need to update its value.

I thought maybe I could write the default script to be: If PM AND PMO equals Approved, set text field to PMO Approved. I'm not sure how/where to add "AND".

Thank you!

1 Answer 1

1

Try setting "Default" property of text control to:

If(PMApprovalDropDown.Selected.Value = "Approved", "PM Approved", PMOApprovalDropDown.Selected.Value = "Approved", "PMO Approved", ProjectSponsorApprovalDropDown.Selected.Value = "Approved", "Sponsor Approved", "")

In place of PMApprovalDropDown, PMOApprovalDropDown and ProjectSponsorApprovalDropDown, use correct names of respective dropdown controls.

Documentation: If and Switch functions in Power Apps


Update from comments:

Add conditions in order from higher stage to lower stage like:

If(ProjectSponsorApprovalDropDown.Selected.Value = "Approved", "Sponsor Approved", PMOApprovalDropDown.Selected.Value = "Approved", "PMO Approved",  PMApprovalDropDown.Selected.Value = "Approved", "PM Approved", "")
3
  • Thanks for your response. The problem is that people at 3 stages will go into and Approve this form. So I'd need the Text value to change. For example, when the PMO goes into the form to Approve, the PM's Approval is still marked "Approved", so when the PMO Approves, the Text value doesn't change - because PM also says approved. Maybe If PM Approval equals Approved, text field changes to "PM Approved". But if both PM Approval AND PMO Approval drop downs equal Approved, then change the Text Field's value to PMO Approved. Kinda like that.
    – Quilly
    Commented Aug 31, 2022 at 14:36
  • Try this in your stages order: If(ProjectSponsorApprovalDropDown.Selected.Value = "Approved", "Sponsor Approved", PMOApprovalDropDown.Selected.Value = "Approved", "PMO Approved", PMApprovalDropDown.Selected.Value = "Approved", "PM Approved", "") Commented Aug 31, 2022 at 16:12
  • Perfect! Thank you very much
    – Quilly
    Commented Sep 1, 2022 at 13:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.