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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Set value of Dropdown ...
Power Apps
Answered

Set value of Dropdown on Form Submission

(0) ShareShare
ReportReport
Posted on by 51

Hi All,

 

Been spent a lot of time on setting a value of dropdown control while submitting the Power Form. Need suggestions/help.

 

App - Canvas app

Data Source - SharePoint List

Form type - Customized the default SharePoint new/edit form 

 

I have a drop down field called Status from SharePoint list called Requests. I would like to set the value of the dropdown before the submit button is clicked so that the value of drop down also gets submitted while form is getting submitted. 

 

Tried setting default values or DataCardValue29.Selected.Value ="Completed" but the value of the drop down didn't update or work as expected. 

 

Any suggestions or help is appreciated

 

@RezaDorrani @WarrenBelz @LaurensM 

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

    @Marutha_K - what is the data type for the Status field? Is it Single Line Text or Choice? Is your dropdown control a dropdown control or a Combo box ?

  • Marutha_K Profile Picture
    51 on at

    Hi @Amik ,

     

    It is a Choice field of type dropdown from SharePoint list as a data source.

     

    I have tried multiple ways but couldn't accomplish it. 

    1. Setting the value of the dropdown before form submission 

    2. Setting the default value of the dropdown - but this may not work for my scenario since the previous value set as default value (in SharePoint list) itself gets affected - value of status changes depending upon the current user and upon multiple values entered & submitted

     

    Hence am thinking it is correct to set the value of drop down before submission of the SharePoint form.   

     

  • Verified answer
    Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    @Marutha_K - assuming it is a Combo Box, and you want the Default value of that Combo Box to be automatically set to "Completed" when the Form is in NewMode, apply the below to the DefaultSelectedItems property of the Combo Box:

     

    If(
     'Your Form'.Mode = FormMode.New,
     {Value: "Completed"},
     Parent.Default
    )
    

     

     

  • Marutha_K Profile Picture
    51 on at

    Hello @Amik 

    Thanks for the response. If I set the DefaultSelectedItems property then the previous value stored in this control gets affected - to explain further, I am trying to set the value of the combo box while the form is getting submitted but if I set the DefaultSelectedItems property then the previous value of the drop down which is displayed in the form gets affected.

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

    @Marutha_K - the previous value would not be impacted because the formula suggested is only setting the default value if the Form is NewMode. If the Form is in EditMode, then the existing value is returned.

     

    I have re-read your requirement several times, and unfortunately I cannot understand what it is you need.

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 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard