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 / Can't get custom Power...
Power Apps
Unanswered

Can't get custom Power App form to take a second submission without a browser refresh?

(0) ShareShare
ReportReport
Posted on by 5

I built an app that takes some text values and a file attachment and adds them to a SharePoint document library via a Power Automate flow. The screenshot is what the end user sees, and the code snippet below is what the "Upload" button does.

 

The problem I'm having: this only works ONCE, and then subsequent uploads don't actually work, despite the fact that it'll say "Your file has been submitted!" at the end (which you'll note, is the last line of my code). But on the second and other subsequent runs the file never makes it to SharePoint, the workflow never kicks off, and the time it takes for the form to say "...submitted!" is way faster on subsequent submits (an indicator that it's not actually doing anything).

 

If I refresh the browser after each submission then it works, but obviously that's not ideal for our users. What do I have to do to make this allow multiple submissions in a row? I tried the ResetForm thing but since this isn't technically a form I guess(? it's just a "screen" and that's not the same thing right?!), that's not working; anything I try with "ResetForm" seems to indicate that I'm not using the correct syntax, and I can't figure out what the syntax should be.

 

Note in my most recent version of the code, I try to reset the variables at the end in case that's what's causing an issue. Doesn't seem to make a difference one way or the other though.

Screenshot 2022-02-02 120845.png

 

 

Set(varDemoFromAttachmentControl, JSON(Image1.Image, IncludeBinaryData));
Set(varBase64Only, Mid(varDemoFromAttachmentControl, Find(",", varDemoFromAttachmentControl)+1, Len(varDemoFromAttachmentControl) - Find(",", varDemoFromAttachmentControl) -1));

If(!IsBlank(OnBehalfOfPicker.SelectedItems),Set(varOnBehalfOfEmail,OnBehalfOfPicker.Selected.Mail));

'UploadP-CardReceipt'.Run(Last(AttachmentControl.Attachments).Name,varBase64Only,Vendor.Text,Text(TransactionDate.SelectedDate,"[$-en-US]yyyy-mm-dd"),Amount.Text,varOnBehalfOfEmail,'Comments/Description'.Text,"unused",User().FullName);

Reset(Amount);Reset(TransactionDate);Reset(Vendor);Reset(OnBehalfOfPicker);Reset(AttachmentControl);Reset('Comments/Description');
Set(varDemoFromAttachmentControl, "");
Set(varBase64Only, "");
Set(varOnBehalfOfEmail, "");

Notify("Your file has been submitted!");

 

Categories:
  • WarrenBelz Profile Picture
    156,774 Most Valuable Professional on at

    Hi @mgudites1 ,

    I would like to give you a better answer, but there are circumstances where opening an integrated app a second time from SharePoint on a different record retains values, especially when you have a secondary list query or are relying on App OnStart or screen OnVisible to set something. My users know to simply refresh.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

     

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 337 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 250

#3
Mohsin Ali Profile Picture

Mohsin Ali 225

Last 30 days Overall leaderboard