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 / OnSelect Button - Sett...
Power Apps
Answered

OnSelect Button - Setting field value based on another field value

(0) ShareShare
ReportReport
Posted on by 517

Hi,

 

Can anyone help me to achieve this requirement? I have a text fields named InternalStatus and RetriggerApproval. I want to set the RetriggerApproval field using OnSelect button when:

 

If

InternalStatus = "MR_ImmManager", set RetriggerApproval text to "RS_to_ImmManager"

ElseIf

InternalStatus = "MR_FinanceManager", set RetriggerApproval text to "RS_to_FinanceManager"

ElseIf

InternalStatus = "MR_ITManager", set RetriggerApproval text to "RS_to_ITManager"

ElseIf

InternalStatus = "MR_GroupHead", set RetriggerApproval text to "RS_to_GroupHead"

EndIf.

 

 

Thanks in Advance. Main goal is to re-route again the approval to the one who rejected once modified by the end user.

Categories:
I have the same question (0)
  • Verified answer
    AARON_C Profile Picture
    2,235 Most Valuable Professional on at

    Hi @jaina,

     

    You can use a Switch statement to achieve this.

     

    This will populate the RetriggerApproval Text Input control as soon as InternalStatus is equal to one of your values.

    Place this code in the Default property of your RetriggerApproval

     

     

    Switch(InternalStatus.Text,
     "MR_ImmManager", "RS_to_ImmManager",
     "MR_FinanceManager", "RS_to_FinanceManager",
     "MR_ITManager", "RS_to_ITManager",
     "MR_GroupHead", "RS_to_GroupHead",
     "", ""
    )

     

     

     

    To make the RetriggerApproval get populated by a button, put this on the OnSelect property:

     

    Set(varPopulateText, 
     Switch(InternalStatus.Text,
     "MR_ImmManager", "RS_to_ImmManager",
     "MR_FinanceManager", "RS_to_FinanceManager",
     "MR_ITManager", "RS_to_ITManager",
     "MR_GroupHead", "RS_to_GroupHead",
     "", ""
     )
    )

     

    Then for your Default property of your RetriggerApproval, use: varPopulateText

     

    Please tick Accept as solution if the answer is useful.

    Thanks,

    @AARON_C 

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 431

#2
WarrenBelz Profile Picture

WarrenBelz 360 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 280 Super User 2026 Season 1

Last 30 days Overall leaderboard