Announcements
Hello i have a global variable that stores some data ( json data) How can i clear that variable when i push a button ? Like make the variable empty
@Anonymous Like this
Set(gblVariableJSON, Blank())
---Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
hm not sure if its working. I have an app where i send images from power apps to a web server using power automate. If i close app and open then send images. it works good. If i dont close the app but sends images, then it sends the same images and the power automate times out. Dont seems like when i hit the send button that it resends the collection it haves. I do have a reset on each image etc. I am using a pick image action
this its what happens when i hit send in power apps ClearCollect(colBase64;DropColumns(AddColumns(imageCollection;"Base64";Mid(JSON(Image;JSONFormat.IncludeBinaryData);25;Len(JSON(Image;JSONFormat.IncludeBinaryData))-25));"Image"));;Set(JsonCol;JSON(colBase64;JSONFormat.IncludeBinaryData));; IDM.Run(reg;SONR;FORSIKRING;Jobbtype;JsonCol);; Reset(Jobbtype);; Reset(BarcodeScanner1);; Reset(AddREGBTN);; Reset(AddDmgIndi_btn);; Reset(CLOSEUP_DMG_BTN);; Reset(ADAS_BTN);; Reset(GLASSID_BTN);; (ADAS_IMG.Image);; Clear(imageCollection);; Clear(colBase64);; Set(JsonCol; Blank());; Reset(DMG_SCHEME_BTN);; Navigate(Home)
@Anonymous No idea. I only know that's how you clear a global variable.
The new question you are asking seems to be similar to your other post called "Clear, Cache, Collection". I did not respond to that one because I do not know the answer.
@mdevaney
Thanks, your response helped me with a question I was just about to post!
It work just fine for me, Thanks @Anonymous
Where is the best place to put this call? I have tried in in different OnVisibles, in the App part, in the SharePointIntegrations and it doesn't seem to work. The Set(varID, Blank()) part is what i am having troubles with.
@NiteWalker
One place (and probably where most would use it) would be on the OnSelect property of a button
Thanks for the info.
I figured out my issue... or rather what not to do. I was trying to use a variable to load the items for the datatable. This was not working very well, so I just put in the Lookup function directly in the items and it is working great now.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 411 Super User 2026 Season 2
Mohsin Ali 338
WarrenBelz 256 Most Valuable Professional