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

Hidden fields changes default field to blank

Hi, I've got a power apps form that I want to hide 2 fields when the form loads. It's based on a choice field that defaults to New Request. I've done a rule that says when Request status is equal to New Request it hides the 2 fields and it works. But my problem is the form loads and the status field comes in as blank even though its set to New Request in the list settings so no idea why this is doing this? Any ideas would be appreciated even if i can get the form on load to set the status field to New Request would be an answer. I've attached a screen dump of the rule I set

 

Any help be appreciated

Thanks

Brenden

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User II
Super User II

Re: Hidden fields changes default field to blank

Since the field is on the form (just not visible) the blank value gets submitted. The easy fix is to add a default value to the hidden field. I had a similar issue with a status choice field and here is the formula I used in the DefaultSelectedItems property of the combo box.

 

If(SharePointForm1.Mode = FormMode.New, { Value: "New Request" }, Parent.Default)

 

Your data source and field type might be different, so you may need to tweak the formula.



--------------------------------------------------------------------------------
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

2 REPLIES 2
Highlighted
Super User II
Super User II

Re: Hidden fields changes default field to blank

Since the field is on the form (just not visible) the blank value gets submitted. The easy fix is to add a default value to the hidden field. I had a similar issue with a status choice field and here is the formula I used in the DefaultSelectedItems property of the combo box.

 

If(SharePointForm1.Mode = FormMode.New, { Value: "New Request" }, Parent.Default)

 

Your data source and field type might be different, so you may need to tweak the formula.



--------------------------------------------------------------------------------
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

Highlighted
Frequent Visitor

Re: Hidden fields changes default field to blank

Jeff you are an absolutely star thank you so much for you help really appreciated.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,496)