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

Barcode Scanner scan, verify scan and then send to sharepoint

Hi, 

In need of  little help. I have a barcode scanner on my screen and a send to sharepoint button on my screen with a label to show the scan value. what is the formula to connect the label value to button and send it to sharepoint??

 

I need the label to show the scan first so i can verify the right barcode was scanned. 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @jwwalker ,

No,  you have probably made it easier. Go right back to my first post. - I will put it again below, but change one thing to allow the control to be on another screen. You will need to change BarcodeControlName and YourTextControl to the actual names.

Using a Variable - I will call it vScanCode.

Add to BarcodeControName. OnScan property

Set(vScanCode,BarcodeControlName.Value)
Reset(YourTextControl)

On the Default of YourTextControl 

If(
   !isBlank(vScanCode),
   BarcodeControlName.Value,
   Parent.Default
)

This only sets the field to the current barcode if the control is activated, otherwise it will display whatever is in the record.

Finally on screen exit (and entry is good also for safety), reset the variable

Set(vScanCode,Blank())

The YourTextControl I am referring to simply needs to be the scan code field in your SharePoint list and has to be displayed somewhere in the app and the current record selected. It does not need to be sitting under the scan button as shown.

Does this make sense to you now?

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

14 REPLIES 14
Super User III
Super User III

Hi @jwwalker The Barcode control name has a Value and an OnScan property, so a text field can be set to BarcodeControName.Value (replace with the name) when it is pressed. So on the OnScan put (replace name)

Reset(YourTextField)

On the Default of YourTextField

BarcodeControName.Value

If you use the field to display exiting barcodes, you are better off with a Variable - let me know and I will do the code for this.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up

Hi Warren, 

Yes sir, I would like if you help me with this code please.

OK @jwwalker ,

Using a Variable - I will call it vScanCode.

Add to BarcodeControName. OnScan property (replace with the name) 

UpdateContext({vScanCode:BarcodeControlName.Value})
Reset(YourTextField)

On the Default of YourTextField (again replace with your control name)

If(
   !isBlank(vScanCode),
   BarcodeControName.Value,
   Parent.Default
)

This only sets the field to the current barcode if the control is activated, otherwise it will display whatever is in the record.

Finally on screen exit (and entry is good also for safety), reset the variable

UpdateContext({vScanCode:Blank()})

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Guess i dont understand 😞 thanks for the help.

Hi @jwwalker 

What do you need me to clarity? See below

First the scan button, then the text field. The scan button will present as a camera control on a mobile device.

Scanner1.png

 

 

 

 

 

 

Scanner2.png

 

 

 

 

 

 

 

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

@WarrenBelz Thank you for the screenshots. On screen1 I have added a barcode scanner with a label to show the value of scanValue. Label is used to verify i scanned the correct barcode. Then i have a button above the label and i want the value of the verified label to be sent to sharepoint via this button.... ??? not sure how to get that value from the label to the button when i push the button.

 

::Button::(Receive Label value and send to sharepoint upon verification of correct barcode was scanned)

::Label::(To hold scanvalue and verify correct barcode was scannned)

::Scan::(To scan barcode)

OK @jwwalker ,

I assume from your reply now have a valid barcode in the label.

Next thing - where do you display your sharepoint list selected item on the screen and what does it look like (send screenshot if easier)

Barcode scanner fx: OnScan-fx-Set(scanValue, BarcodeScanner6.Value)

Label fx: Text-fx-scanValue

Send to Sharepoint Button fx:  Patch( 'Laptop Service Tag(S/N)', Defaults('Laptop Service Tag(S/N)'), {Title:"BarcodeScanned", 'BarcodeScanned': Label4.Text, Who: User().FullName, When: Now()}); Reset(Label4.Text); 

 

 

The Send to sharepoint button is the only broken piece. Getting errors. 

 

 

 

here is screenshot attached. sry. new to this

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (8,202)