cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GauravG
Responsive Resident
Responsive Resident

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
Responsive Resident
Responsive Resident

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
Responsive Resident
Responsive Resident

@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
Responsive Resident
Responsive Resident

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

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (49,166)