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
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
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)
Solved! Go to Solution.
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.
Could you share what you are using to submit the form?
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:-
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.
@Pstork1 There is no such property for form in Power Apps.
I am showing here the properties and what i have in "OnSuccess". Thanks
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.
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!
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.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
260 | |
128 | |
86 | |
85 | |
68 |