0
votes

I'm trying to create an application in Powerapps, that will allow me to scan several barcodes, and then put the output from those scans into a table.

I have 3 elements that I'm using for testing:

1) The barcode scanner called MyScanner.

2) A Label Text Field called Label1.

3) An edit Form with a Data Card called Datacard1

When I scan an item, The Text value in Label1 becomes Myscanner.Value

What I want is for the datacard1 Input to be The text in Label1.

What I've tried is setting the default field value for datacard1 as Label1.Text but the card value never changes.

Am i trying to update the wrong value for the datacard, or is my syntax wrong,

1
were you able to resolve this? I have the same issue.Mr.ecos
I was, but I honestly cannot remember exactly how I did it. If I'm remembering correctly I didnt use Forms in the solution. I believe I created a gallery whose datasource was an empty collection. The input from the scanner i sent to the collection and once Id scanned all the codes I wanted to, I patched the collection to a table. You could probably do it without a gallery, but I wanted to be able to see the items that I scanned, so I could delete them if it was an accidental mis-scanLafaMan
Ah, very interesting. Thank you for your thoughts.Mr.ecos
Please check my answer. I had the same problem but I found a solutionINS

1 Answers

0
votes

I've found a solution here and it works.

To put it short (quoted from the link):

  1. Set the OnVisible property of the Edit screen to following:

    Set(IsReset, false)

  2. Add a BarcodeScanner control outside the Edit form (within the Edit screen), set the OnScan property to following:

    Set(IsReset, false); UpdateContext({code: ""}); UpdateContext({code: BarcodeScanner2.Value}); Set(IsReset, true)

  3. Set the Default property of the Text Input box within the corresponding Data card to following:

    If(IsReset, code, Parent.Default)