cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
davyjones
Helper III
Helper III

variable carrying over from another ticket

Good day all!

 

I have an app that creates a ticket and has various stages where different parties have to fill in their part.  One part asks the I.T. group to fill in how much the request is going to cost.  If this is a new ticket, I would like that box to start out blank.  If they have already filled in the number and saved it, I (of course) would like it to display the number that is now stored in the SharePoint.  

 

The problem I am having, is that when someone views another ticket, and that variable is picked up, that number stays in the buffer and is then displayed in the next ticket if there was a blank.  If they open a ticket where a different number is, then the new number is displayed.  So, this problem only happens if the second ticket was supposed to be blank in that box.

 

The current code in my 'default':

 

davyjones_0-1659556209231.png

can anyone please help me?


thank you!


David

1 ACCEPTED SOLUTION

Accepted Solutions
BCBuizer
Super User
Super User

Hi @davyjones ,

 

Please consider changing the value of the variable to blank after you are done using it. For instance to add the below formula to the OnSucces property of a form where the variable is used to populate one of the fields in the form:

 

Set(Variable,Blank())

 



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

View solution in original post

6 REPLIES 6
BCBuizer
Super User
Super User

Hi @davyjones ,

 

Please consider changing the value of the variable to blank after you are done using it. For instance to add the below formula to the OnSucces property of a form where the variable is used to populate one of the fields in the form:

 

Set(Variable,Blank())

 



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

good morning, @BCBuizer !

 

I set that bit of code not only on the 'onselect' of the save button (after the patching), but also on the 'onsuccess' of the form on that page.  The problem still remains.  Anything that is saved from that variable remains when someone opens a different ticket.  do you know what I might be doing wrong?

 

thank you,


david

BCBuizer
Super User
Super User

Hi @davyjones ,

 

Assuming the variable is blank as expected, the default value may come from Parent.Default. Can you share the Default property of the DataCard and the Item property of the form?



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

hey @BCBuizer , thank you for getting back.  As requested, here are the results:

 

davyjones_0-1663943775282.png

This seems right, as it is calling the value from the SharePoint for that particular field.

davyjones_1-1663943864392.png

I am guessing that you are speaking of the form within that particular screen, right?  this is that, and doesnt look too bad.  I am at a loss here!

 

 

BCBuizer
Super User
Super User

Hi @davyjones ,

 

I assume _RequestForm is some kind of variable. Can you make sure this is updated when the user selects a different ticket?



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

Hey @BCBuizer !  sorry for taking so long to reply, work got very busy!

 

Yes, the idea is that after the user hits the 'save' button on the previous ticket, the variable would then clear out, so it wouldnt be on any other tickets.  I have that code on the 'save' button shown below.  However, I tried again this morning and it seems to save the variable even though everything looks clean.  Thoughts?

 

davyjones_0-1667483715649.png

Also, here is the code for the box itself, maybe there is something that can be improved here?

 

davyjones_1-1667483787217.png

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,274)