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

Switching between variable and saved data in edit form

Hi all,

 

Hopefully someone can help me with a formula.  

 

I have a form that gets data from a barcode using a variable. Ie. 

 

Onscan- saves the barcode info to a variable which is then put into a data card. 

 

That all works fine until I come back to that form to edit it. Because the data card requires a variable it doesn't show the saved data in the field that was previously saved. Hope that makes sense.

 

Is there a way that I can formulate it to show the saved data if there is some but if not ask for a barcode?

 

Cheers

 

Gaz

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@Gazbeer 

I assume you have a TextInput control in your form to display the value.

If so, then set your Default property of the TextInput control to:

   Colaesce(Parent.Default, yourVariableHere)

 

Now, this will show the stored value...it will not let you edit it by scanning another barcode, but you didn't seem to indicate that was a requirement.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

3 REPLIES 3
RandyHayes
Super User
Super User

@Gazbeer 

I assume you have a TextInput control in your form to display the value.

If so, then set your Default property of the TextInput control to:

   Colaesce(Parent.Default, yourVariableHere)

 

Now, this will show the stored value...it will not let you edit it by scanning another barcode, but you didn't seem to indicate that was a requirement.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

Brill thank you. I will try it when I get you work in a bit! Nights!! Yes you're correct. I don't need it to be able to be rescanned. Thanks for your help

Yep worked a treat thank you. Had an error at first but it was just a spelling mistake on coalesce.

 

Thanks for your help

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,835)