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

Forms work correctly in Preview but Published form working not working correctly

Hi,

 

I have a form that works perfect in preview but is causing me issues when I publish it. I generated my form from a SharePoint list. I have a custom home screen where a user clicks an icon submit a new request. This navigates to EditScreen1, with DefaultMode set to FormMode.New (because this should always be new info, not used for editing in my Form). Once the user submits the form it navigates them to a custom screen called SetupTasks. This is an Edit screen with an item of "EditForm1.LastSubmit." In Preview everything works fine. However, with the published form, when I click the submit button, I can see it reset the only toggle I have on the screen and submits it with the default info for this control.

I have tried several different fixes but they all misbehave one way or another (sometimes the new form retains previously submitted info, sometimes it overwrites previously submitted info, etc.). Any tips you can offer would be much appreciated. I've got screenshots as well. Thank you!

 

SubmitButton OnSelect:

 


If(IsBlank(ClientNumbers),Set(ClientNumbers,TextInput4.Text));
If(IsBlank(ClientNames),Set(ClientNames,TextInput5.Text));
If(IsBlank(ContactNames),Set(ContactNames,TextInput1.Text));
If(IsBlank(ContactEmails),Set(ContactEmails,TextInput2.Text));
SubmitForm(EditForm1);
If(FormUserEmailVar = DataCardValue11.Selected.Email,Set(StatusVar,"New"); Set(FilterVar,"New");Set(FilterVar2,FormUserEmailVar);Set(ItemVar,EditForm1.LastSubmit);Navigate(SetupTasks,ScreenTransition.None),Navigate(Confirmation,ScreenTransition.None));
Office365.SendEmail(DataCardValue11.Selected.Email,Concatenate("Client ",DataCardValue12.Text," Interested in Product"),HtmlText4.HtmlText,{From:User().Email,Cc:Concatenate(DataCardValue10.Selected.Email,";",DataCardValue17.Selected.Email),IsHtml:true,Importance:"Normal"})

 

 

homescreen.pngHome Screen (custom scroll screen)activationrequestscreen.pngActivation Request (EditScreen1)setuptasks.pngSetup Tasks (custom form screen) 

 

 

4 REPLIES 4
Jdscott
Level: Powered On

Re: Forms work correctly in Preview but Published form working not working correctly

Have you checked the Update Property of the cards in your form? They should be something like:

 

toggle1.Value

 

If you want something saved to your database besides a boolean TRUE/FALSE, then you could update an invisible textbox with the text you want to save to your database and set the Update Property of your card to the text in the textbox.

rodieremix
Level: Powered On

Re: Forms work correctly in Preview but Published form working not working correctly

Hi @Jdscott,

 

Thank you for the response, the Update property seems to be correct, here's a screenshot:

 

updatescreenshot.pngUpdate property

I would prefer a boolean TRUE/FALSE for my SharePoint list item. 

 

KOM_4410
Level 8

Re: Forms work correctly in Preview but Published form working not working correctly

That is really frustrating!!! I had experienced the same issue with date fields and attachments. It works very well on the preview mode but it erases the values on the play mode...and only happens on some apps.

 

I did a workaround with the dates that might work for you. I add an external date control to pick up the date (out of the form) and then made the default value control in the form equal to that datepicker. You could try the same with the toggle I guess.

 

I still haven't fixed the issue with attachments though. If anyone had the same please let me know!

rodieremix
Level: Powered On

Re: Forms work correctly in Preview but Published form working not working correctly

Thanks @KOM_4410, your input gave me an idea that ended up working. I ended up using a variable which seems to be working as I want it to. Still frustrating as it's clearly not working as designed, but this will do for now. Thanks again!

 

6-1-2018 10-20-50 AM.png

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

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

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 41 members 4,722 guests
Please welcome our newest community members: