cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Re: While using Variables it's showing values/results from previous record

the Ready was just an example. What im really doing is sending the text from textinput1 to the notes field with the Plus icon (screenshot). I'm also including the screenshot of the Onvisible from the form so you can see how im updating the notes field when opening a record.

Highlighted
Impactful Individual
Impactful Individual

Re: While using Variables it's showing values/results from previous record

Looks like your overwriting notes. Is that what you want or are you appending?

If appending you’ll want to load the note from data source into variable on visible. Then when you do your update context you want to do varnotes: varnotes & textbox.text) so it appends. You can add a carriage return in there too with something like varnotes & “ shift+enter “ & textbox.text)

Then submit form should submit that over. If your screen navigates to your selection every time then the onvisable variable should be all you need.
Highlighted
Impactful Individual
Impactful Individual

Re: While using Variables it's showing values/results from previous record

If that doesn’t help any might be a selection issue not updating it right. Move the variable set from onvisable over to your gallery? Onselect. Plug in before navigate your update context statement followed by ; but instead of selected. Use updatecontext({varnotes:ThisItem.Notes})

Pretty sure you can access that via onselect.
Community Support
Community Support

Re: While using Variables it's showing values/results from previous record

Hi @Anonymous ,

Based on the issue that you mentioned, I think this issue is related to that the varNotes is not cleared after you save your item or close the item.

 

On you side, when you save your item or close this item, you should also need to clear the varNotes variable at same time.

I have made a test on my side, please take a try with the following workaround:

Add the following formula within the OnSuccess property of the Edit form in your app:

Set(varNotes, Blank())          /* Clear this variable when you save your form */

Set the OnHidden property of your Edit screen (which contains Edit form) to following:

Set(varNotes, Blank())     /* <-- When navigating away from current Edit screen, the varNotes variable would be cleared */

Add the following formula within the OnSelect property of the "X" icon within your Edit screen:

Set(varNotes, Blank())          /* <-- Click "X" icon to close this item, then clear the varNotes variable */

Please take a try with above solution, check if the issue is solved.

 

Best regards,

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

View solution in original post

Highlighted
Frequent Visitor

Re: While using Variables it's showing values/results from previous record

It looks like you are mixing Set(varNotes...) with UpdateContext({varNotes:})

 

The UpdateContext() will create a scoped variabled for that screen. It will overshadow the global variable you created with Set(). Thus when you are resetting the varNotes using Set() it will not reset the context variable.

 

Hope this helps

Fredrik

Highlighted
Anonymous
Not applicable

Re: While using Variables it's showing values/results from previous record

Yes i went back and changed all of the variables to Set() and moved the variable from the OnVisible to Sharepointintegration in the New, Edit & VIew properties. It works now. However, i have not cleared the variables since the sharepointingration overwrites the value each time i open a new record.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,141)