cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MGB42
Frequent Visitor

Global variable triggering on opening form

Hi,

 

I have built a custom form from a SharePoint list that includes a cascade drop down (using managed metadata). 

 

In the first column of the cascading dropdown the OnChange is

Reset(DataCardValue9);Set(resetkeytarget,"Yes")
 
In the second column of the cascading dropdown the DefaultSelectedItems is
If(resetkeytarget="Yes",Blank(),Parent.Default)
 
The FormScreen OnVisible is
Set(resetkeytarget,"No")
 
I have also set all the SharePointIntegration actions & the App OnStart to
Set(resetkeytarget,"No")
 
The cascade functionality works fine and the data is written to SharePoint list perfectly
BUT when I open the form in SharePoint from an existing row/item (sorry not sure on my terminology here) the value in the second column of the dropdown shows for a second then dissappears. Oddly when I close the form and open it again the value is there.
I can repeat this for other items with the same effect or if I refresh the SP List it also happens.
 
Any help would be very much appreciated.
1 ACCEPTED SOLUTION

Accepted Solutions
MGB42
Frequent Visitor

Hi, 

 

I appear to have stumbled into a solution to my own problem (oh the irony two days of struggle and when I post the problem I then find the solution). Anyhow it is here.

 

https://powerusers.microsoft.com/t5/Building-Power-Apps/Global-or-context-variable-unchanged-if-page...

 

I removed Set(resetkeytarget,"No") from each of the SharePointIntegration Actions and added 

Navigate(FormScreen1, ScreenTransition.None) to OnEdit, OnView and OnNew
 
It appears to be working fine and thank you to all you kind people out there posting helpful stuff.

 

View solution in original post

2 REPLIES 2
MGB42
Frequent Visitor

Hi, 

 

I appear to have stumbled into a solution to my own problem (oh the irony two days of struggle and when I post the problem I then find the solution). Anyhow it is here.

 

https://powerusers.microsoft.com/t5/Building-Power-Apps/Global-or-context-variable-unchanged-if-page...

 

I removed Set(resetkeytarget,"No") from each of the SharePointIntegration Actions and added 

Navigate(FormScreen1, ScreenTransition.None) to OnEdit, OnView and OnNew
 
It appears to be working fine and thank you to all you kind people out there posting helpful stuff.

 

alrez
Community Support
Community Support

Hi,

 

Thanks for your follow up post! I am glad you were able to get this resolved on your end. Hopefully this will prove useful for future communities users.

 

Regards,

 

Alex

 

-------

 

Community Support Team _ Alex Rezac
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

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
Users online (3,894)