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

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 34 members 3,657 guests
Please welcome our newest community members: