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

Split QR code

Hi everyone, 

 

I have two QR code that I need to split and use the appropriate information to populate text fields. I have read on here someone mentioned SplitScan function and tried to look further into it. But I couldn't find what it exactly does. Can anyone explain what it is?

 

Since I have two different QR code string, if I were to use the SplitScan function, how do I differentiate them? Can I assign a variable to them? For example SplitScan result from BarcodeScanner1 to be SplitScan1 and SplitScan result from BarcodeScanner2 to be SplitScan2. 

 

Hope that makes sense. Thank you in advance. 

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @nurbmr ,

Firstly, if these are fixed length (example you have a 20-character scan and the first one is 8 and the second 12), you would do this

UpdateContext(
   {
      varScan1:Left(BarcodeScannerName,8),
      varScan2:Right(BarcodeScannerName,12)
   }   
)

and you would have a Variable with a scan in each.

If they were split by a character (I will use the | pipe symbol here)

With(
   {
      wScan:BarcodeScannerName,
      wSep:Find("|",BarcodeScannerName)
   },
   UpdateContext(
      {
         varScan1:
         Left(wScan,wSep-1),
         varScan2:
         Right(
            wScan,
            Len(wScan)-wSep
         )
      }
   )
)

 

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

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @nurbmr ,

Firstly, if these are fixed length (example you have a 20-character scan and the first one is 8 and the second 12), you would do this

UpdateContext(
   {
      varScan1:Left(BarcodeScannerName,8),
      varScan2:Right(BarcodeScannerName,12)
   }   
)

and you would have a Variable with a scan in each.

If they were split by a character (I will use the | pipe symbol here)

With(
   {
      wScan:BarcodeScannerName,
      wSep:Find("|",BarcodeScannerName)
   },
   UpdateContext(
      {
         varScan1:
         Left(wScan,wSep-1),
         varScan2:
         Right(
            wScan,
            Len(wScan)-wSep
         )
      }
   )
)

 

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
Super User
Super User

Hi @nurbmr ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

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 @WarrenBelz , 

It works! Thanks for your help. 

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,044)