cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AydenHill93
Frequent Visitor

Barcode with multiple details to SharePoint

Hey guys, im new to power apps so this is potentially a weird one and I'm not entirely sure its going to be possible. 

 

Im trying to build an inventory management app of sorts. I want to scan a barcode that contains around 7 details about a product, these barcodes can be in any format but at the moment the items are comma delimited.

 

I then want to display those details to make sure they are correct and then save them to separate columns of a SharePoint list. 

 

So far I have a barcode scanner and listbox working, the scan gets the product details and they are being split appropriately into my listbox for checking.

 

My issue is then taking these individual details and sending them to separate columns of a sharepoint list i have. I can get the whole string from the barcode sent up to the list but its all populated into one column. I need to somehow separate using the comma delimiting or another method. 

 

the list looks like this:

 

AydenHill93_1-1617286097161.png

 

with the QR code being this:

 

AydenHill93_2-1617286130974.png

 

What i need is each item 'this is a test' 'second test' and 'test test test' to be in their respective columns.

 

I really hope this makes sense. 

1 ACCEPTED SOLUTION

Accepted Solutions
Keith-Whatling
Advocate II
Advocate II

Hi,

 

The QR code scanner returns a string, you can use the Split() function to split that string up into rows a collection, this will give you them in order.

 

Split("Value1,Value2,Value3",",") So the string to split would be whatever your long string on your QR code.

 

Then you'll need to use the First Last N technique to get the values in order.

 

So to patch to sharepoint

With(

{
    ThisScan : Split(BarcodeScanner.Value,",")
},

Patch(SharePointListName,

Defaults(SharePointListName),
{
      Column1:First(ThisScan),
      Column2:Last(FirstN(ThisScan,2),
      Column3:Last(FirstN(ThisScan,3),
      etc etc then,
      Column7:Last(ThisScan)
}

)

)

If it solves your issue please marked it as solved, kudos etc please 🙂

View solution in original post

2 REPLIES 2
Keith-Whatling
Advocate II
Advocate II

Hi,

 

The QR code scanner returns a string, you can use the Split() function to split that string up into rows a collection, this will give you them in order.

 

Split("Value1,Value2,Value3",",") So the string to split would be whatever your long string on your QR code.

 

Then you'll need to use the First Last N technique to get the values in order.

 

So to patch to sharepoint

With(

{
    ThisScan : Split(BarcodeScanner.Value,",")
},

Patch(SharePointListName,

Defaults(SharePointListName),
{
      Column1:First(ThisScan),
      Column2:Last(FirstN(ThisScan,2),
      Column3:Last(FirstN(ThisScan,3),
      etc etc then,
      Column7:Last(ThisScan)
}

)

)

If it solves your issue please marked it as solved, kudos etc please 🙂

View solution in original post

Something isnt right but im not experienced enough to understand what. Its complaining about the type of argument

 

 

AydenHill93_0-1617292109816.png

 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,120)