web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Use Button to submit f...
Power Apps
Unanswered

Use Button to submit form and update the value of a lookup/dropdown list in the form

(0) ShareShare
ReportReport
Posted on by 77

Hello.

 

I've created a form that uses a SharePoint choice column to show the status of an item. In the the auto-generated form, this is represented as a dropdown list that queries the SharePoint choice item for four values. I'd like to be able to use a button on the form to change the value of this dropdown and update the item in the form with the new value. 

powerappticketupdate.png

 

I've succesfully done this with Context variables if the field in SharePoint is a text field (via UpdateContext) but I can't get the same technique to work with the dropdown based on the SP Choice column. When I try, I get an error about trying to set a Record value with a Text context variable. I've searched the forum a good long time and figured I try here before giving up. Anyone have any ideas?

 

Categories:
I have the same question (0)
  • v-monli-msft Profile Picture
    on at
    Re: Use Button to submit form and update the value of a lookup/dropdown list in the form

    Hi @RayBoone,

     

    I'm not sure that I have fully understood your need. Did you mean that you want not to submit the whole edit form but only change one choice column in the form when a button clicking? May I know the formula that you used to update the text field? 

     

    Regards,

    Mona

  • RayBoone Profile Picture
    77 on at
    Re: Use Button to submit form and update the value of a lookup/dropdown list in the form

    @v-monli-msft I didn't use a formula per se...just set the value of the text field to a context variable. The data card was set to update the value in the SharePoint list. Then I did an UpdateContext/SubmitForm on the field when the button was pressed. 

     

      texttocontext.pngupdatecontextandsubmitform.png

  • RayBoone Profile Picture
    77 on at
    Re: Use Button to submit form and update the value of a lookup/dropdown list in the form

    Any other thoughts?

  • ShanP Profile Picture
    143 on at
    Re: Use Button to submit form and update the value of a lookup/dropdown list in the form

    For dropdowns, you need to add Selected.Value at the end. So for example:

     

    DataCardValue5.Selected.Value

     

    as opposed to a text field, which is DataCardValue5.Text

  • RayBoone Profile Picture
    77 on at
    Re: Use Button to submit form and update the value of a lookup/dropdown list in the form

    Thank you--haven't had a chance to get back to it yet, but will post back here when I do.

  • Digital Profile Picture
    1,207 on at
    Re: Use Button to submit form and update the value of a lookup/dropdown list in the form

    I know this is an ancient thread, but it came up when I searched a similar problem so thought I'd post a response as it may help someone else.

     

    You can update the value of a combo box using a button by using a context variable in the DefaultSelectedItems property of the combo box.

     

    I think this might solve the problem. When form mode is new the combox box value is set to the contents of varStatus. You can then use a button to update the context variable for the new status. I have tested this and it works fine.

     

    If(
    Form1.Mode = FormMode.New,
    {Value: varStatus},
    Parent.Default
    )

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 836 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 231 Super User 2025 Season 2

Last 30 days Overall leaderboard