cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
meganschu
Frequent Visitor

Form submitting combobox values when none selected

I have an app to enter/update items on a SharePoint list. I have one form for new entries and one form for updating existing entries. I am having the same issue with both. The forms consist of text inputs and comboboxes (either single select or multi select). None of these fields are set to required within the app or on the SharePoint list. However, when I submit the forms all of the comboboxes are submitting values for the first item in the list regardless of whether they have been selected or not. I need to be able to leave these values as empty until an item is selected. Please advise and thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
Jeff_Thorpe
Super User
Super User

Did you check the fields in SharePoint to make sure they didn't have a default value? When you create a choice column in SharePoint it will automatically create you a default value.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

4 REPLIES 4
Jeff_Thorpe
Super User
Super User

Did you check the fields in SharePoint to make sure they didn't have a default value? When you create a choice column in SharePoint it will automatically create you a default value.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

leyburn19
Memorable Member
Memorable Member

here is a suggestion.  In your forms where teh fields are put a control that is not bound to the datasource.  Use this control for your users.  Then hide the actual control that saves to the datasource,  but make its default value to be based on the unbound control.  

 

If the unbound has no data it will be empty till teh user select or inputs something.  At this time the real control will update based on the at controls value.  If this still puts data in the sharepoint list then it may be how you are configuring the defaul values of your controls

Good catch. This fixed the issue. Thanks.

Anonymous
Not applicable

I know this is old. But just wanted to suggest another work around I have applied.

 

Screen "On Visible" > Set(var_FieldDefault, CardName.Default).

Card "On Change" > Set(varFieldChange, true).

 

Then within update property of the card, use:

If

(
   var_FieldChange = true,

   ,
      ComBoxName.Selected.FieldName,
      var_FieldDefault
)

 

What this does is updates the original value of the field if the field has not been changed. Or if the field has been changed, the update works as expected.

 

Hope this helps!

Helpful resources

Announcements
User Groups Public Preview

Join us for our User Group Public Preview!

Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (28,450)