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 / Select combo box item ...
Power Apps
Unanswered

Select combo box item on one screen when pushing button control on another

(0) ShareShare
ReportReport
Posted on by 18

Hello,

 

I am trying to develop an app where pushing a button on one screen sets the role of the user in a combo box on a form on another screen.  The intent is to set and document the role of the user without the user selecting it from a combo box and have it submitted to it's connected List after submitting the form.  That way the user can continue to create reports under the same role without having to select it for each submission.

 

What formula(s) could I use for this?  Thanks in advance.

 

SCMatt

Categories:
I have the same question (0)
  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @SCMatt - the answer depends on the data type of the field your using to save the user's role back to your list. For example are you saving the role onto a Single Line Text field, SharePoint Choice field, LookUp field?

  • SCMatt Profile Picture
    18 on at

    Hello @Amik, thank you for your help.  I'm trying to match the text of the button with a choice field in a combo box.  Just trying to get the combo box to select the choice based on a button push.  

     

    Matt

  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @SCMatt - assuming the Choice field is a single-select choice, you can use a Global Variable. For example, on the OnSelect property of the Button control, use:

     

    Set(
     gbl_role,{
     {Value: "One of the roles in your Choice field"}
    )

     

    On the DefaultSelectedItems property of the ComboBox control, use:

     

    Coalesce(
     Parent.Default,
     gbl_role
     )

     

    You can alternatively use a Local Context Variable and pass that Variable across screens using:

     

    Navigate(
     'Your Other Screen',
     ScreenTransition.None,
     {ctx_role: {Value: "One of the roles in your Choice field"}}
    )
    

     

    And then use the code below on the DefaultSelectedItems property instead:

     

    Coalesce(
     Parent.Default,
     ctx_role
     )

     

    If by "match the text of the button" you mean you want to leverage the Text property of the Button, you can use the same pattern as above but instead use something along the lines of:

     

    Set(
     gbl_role,{
     {Value: Self.Text}
    )

     

  • SCMatt Profile Picture
    18 on at

    Hi Amik,

     

    I think my problem was that I was referring across lists, which was not my intent.  I was trying to get LookUp columns to speak with each other but they weren't doing that.  I simplified things by referring to multiple galleries within containers triggered by button pushes.  I'm not sure if this solves my problem completely yet.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard