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 / Change Choice Field ba...
Power Apps
Unanswered

Change Choice Field based on global variable

(0) ShareShare
ReportReport
Posted on by 48

Hello all, 

 

I maybe going about this all wrong so feel free to point me in the right direction. 

The Homepage has 5 New buttons. Each new button has different fields based on these SharePoint content types. 

The first one is Organizational. 

I have a "ChangeType" Choice field that lists the 5 choices. 

When a user selects one of the "New" buttons, I would like to change the "ChangeType" field to the choice the user made. 

The "ChangeType" field is located on another screen and hidden. 

 

Can anyone help? 

CMHomepage.png
Categories:
  • Kirkby Profile Picture
    659 Moderator on at

    Hi @sdaniel 

     

    //Screen A

    Supposing that the drop down list on the different screen consists of the same texts as the 5 buttons,) the code behind the 5 menu is identical. If that is not the case, please apply proper logic instead.

    The New button that you mentioned is the plus sign on the tab. right?

    confidential_d 14 25 31.png

     

    //Screen B. Populated a drop down list for demo.

    confidential_d 14 25 31 (2).png

    The default value is determined by the option selected by a user on the Screen A

     confidential_d 14 25 31 (3).png

     

     

    Please let me know this is not what you expected.

     

    Kirkby,

  • CRMCrazy Profile Picture
    48 on at

    Thank you for responding. I believe that is really close. I'll try to explain how I set this up. It may not be the best way. There are only the two screens for all five categories since the majority of the fields will be the same. The Change Type field determines which fields will be displayed based upon a variable. 

    Screen A. The "New" button is specific to each Change Type and it sets a variable to show a choice field related to the Change Type. 

    Example: 

    OrganizationalStrategicOperational
    ResetForm(BasicForm);
    ResetForm(DetailsForm);
    NewForm(BasicForm);
    Set(varItem,Defaults('Change Request'));
    Set(varRecordType,"New");
    Set(varOrg,true);
    Navigate(BasicForm)
    ResetForm(BasicForm);
    ResetForm(DetailsForm);
    NewForm(BasicForm);
    Set(varItem,Defaults('Change Request'));
    Set(varRecordType,"New");
    Set(varStrategic,true);
    Navigate(BasicForm)
    ResetForm(BasicForm);
    ResetForm(DetailsForm);
    NewForm(BasicForm);
    Set(varItem,Defaults('Change Request'));
    Set(varRecordType,"New");
    Set(varOps,true);
    Navigate(BasicForm)

     

    Screen B. Is a form which has a choice field "Change Type" listing the five choices from a SharePoint list. I would like to set the Change Type to the correct choice based upon the users selection. 

    Based on your instructions, should I change the Change Type Item to the list choice and not Choices([@'Change Request']).ChangeType)? Is there a way to use the set variable used for each category to change the Change Type?

    Is there a better way of accomplishing this?  

     

     

    image.png
  • CRMCrazy Profile Picture
    48 on at

    After reading your response again, I think your answer should work but I'm fuzzy on the logic that is needed.

    I can change my Form field (Change Type) to a list like you show in your post. 

    How would I change the home screen to New buttons to match Screen B. Currently, the home screen has individual new (+) buttons and isn't a list or gallery. 

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

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard