web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Forms work correctly i...
Power Apps
Unanswered

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

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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"})

 

 

Home Screen (custom scroll screen)Home Screen (custom scroll screen)Activation Request (EditScreen1)Activation Request (EditScreen1)Setup Tasks (custom form screen)Setup Tasks (custom form screen) 

 

 

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    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.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

     

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

     

    Update propertyUpdate property

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

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    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!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks @Anonymous, 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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard