cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Pop-ups unnecessarily reappear before saving SP form built using Power Apps

Hi Community,

I have 2 pop-ups on 2 fields that appear based on how user toggles the control on these.

The pop-ups appear and go back once the pop up is made.

The issue is that just before i save the form, these pop-up seem to reappear before saving and closing the form dialog box. 

It doesn't affect me the functionality just looks bad that it would reappear unnecessarily before saving the form.

I am sharing what i have on these 2 controls- please see if you can help

1st Pop-up

GauravG_0-1603755457211.png

Properties used are:- OnCheck- UpdateContext({WarningPopup:true}); Set(UncheckVersion, true);

On UnCheck- UpdateContext({WarningPopup:false})

Proceed button- UpdateContext({WarningPopup:false})

Cancel button- Set(UncheckVersion,false)

2nd Pop-up

GauravG_1-1603755511460.png

Properties- OnCheck- UpdateContext({ConfirmationPopup:true}); Set(UncheckSignOff, true)

On Uncheck- UpdateContext({ConfirmationPopup:false})

Yes Button- UpdateContext({ConfirmationPopup:false})

No button- Set(UncheckSignOff,false)

 

And SharePoint form OnSuccess property is Refresh(Business_Requirement_Document);ResetForm(Self); RequestHide(); Set(UncheckVersion,false); Set(UncheckSignOff,false)

 

1 ACCEPTED SOLUTION

Accepted Solutions

OK, what is in the OnSave property then?  That's the same as the code that runs when you submit the form.  I suspect you need to add something there to make sure the two variables continue to be false.  You might also want to switch from using Context variables, that are scoped to the screen, and use Global variables instead.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

7 REPLIES 7
Pstork1
Dual Super User
Dual Super User

Could you share what you are using to submit the form?



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Anonymous
Not applicable

Hi @Pstork1 Thanks for replying

 

Please find the form below- it's a SharePoint form built using Power Apps- not a standalone Power Apps. 

The save is used to submit the form from the top of Power Apps form in SP shown below:-

GauravG_0-1603979970304.png

The pop ups reappear before this window collapses on hitting save

 

OK, what is in the OnSave property then?  That's the same as the code that runs when you submit the form.  I suspect you need to add something there to make sure the two variables continue to be false.  You might also want to switch from using Context variables, that are scoped to the screen, and use Global variables instead.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Anonymous
Not applicable

@Pstork1 There is no such property for form in Power Apps.

I am showing here the properties and what i have in "OnSuccess". Thanks

GauravG_1-1603980979497.png

 

 

I assuming this is a SharePoint Integrated List form and not a standalone app.  If so then the SharePointIntegration object has the OnSave property.  That's why I suggest using something other than a context variable.  That object is what you are interacting with when you click Save and I'm not sure the context variable is still valid since that is tied to the screen object and the integration object is at the app level.

image.png



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Anonymous
Not applicable

Thanks @Pstork1 I understood now

The OnSave property comes under Integration not SP form.

Also, as you see the local variables are showing an error- so i will create a global variable.

I was hoping there was another way without needing Global variables since i have created them all already!

GauravG_0-1603991824770.png

 

I think that's why the popups are showing.  Because to save the form the scope switches to the Integration app itself where the context variables are out of scope, so the popups show.  At least that is the theory.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (1,947)