cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Brendenward
Level: Powered On

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

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

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

Brendenward
Level: Powered On

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,892)