cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GauravG
Continued Contributor
Continued Contributor

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
Pstork1
Dual Super User III
Dual Super User III

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 III
Dual Super User III

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.
GauravG
Continued Contributor
Continued Contributor

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

 

Pstork1
Dual Super User III
Dual Super User III

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

GauravG
Continued Contributor
Continued Contributor

@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

 

 

Pstork1
Dual Super User III
Dual Super User III

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.
GauravG
Continued Contributor
Continued Contributor

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

 

Pstork1
Dual Super User III
Dual Super User III

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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,709)