cancel
Showing results for
Did you mean:
Frequent Visitor

## Splitting a Code in different Parts

Hello Community,

I have some Problems with spliting a Text. I Scan a QR code and after that i have in a inputfiel one of these Codes:

 BINI:&SHIP:S. 6312&ORDER:2023_260&PART:FC_00301:TEST

or

 BINI:&SHIP:S. 6312&ORDER:2023_260&PART:FC_00301:UNIT

So my Question is. How can i split this data that i have the following "parts" of the QRCode:

SHIP (S. 6312)

ORDER (2023_260)

PART (FC_00301)

TEST or UNIT

Best Regards

1 ACCEPTED SOLUTION

Accepted Solutions
Helper II

Hi @Maxi88

As shown in the figure you use the qrcode string in two parts

First to take the last part which is Test or Unit using this formula :

``Last(Split(qrcode,":")).Value``

Then for splitting the parts of your qrcode you can use this formula :

``````ForAll(
ForAll(
FirstN(
LastN(
Split(
Substitute(
qrcode,
":",
" ( ",
5
),
"&"
),
3
),
3
),
Value
),
Substitute(
First(
Split(
ThisRecord.Value,
"("
)
).Value & " )",
":",
" ( "
)
)``````

The Result will be a Table you can store the result by set the result to a variable

hope this help

Best Regards

3 REPLIES 3
Helper II

Hi @Maxi88

As shown in the figure you use the qrcode string in two parts

First to take the last part which is Test or Unit using this formula :

``Last(Split(qrcode,":")).Value``

Then for splitting the parts of your qrcode you can use this formula :

``````ForAll(
ForAll(
FirstN(
LastN(
Split(
Substitute(
qrcode,
":",
" ( ",
5
),
"&"
),
3
),
3
),
Value
),
Substitute(
First(
Split(
ThisRecord.Value,
"("
)
).Value & " )",
":",
" ( "
)
)``````

The Result will be a Table you can store the result by set the result to a variable

hope this help

Best Regards

Frequent Visitor

@BoHamad thanks a lot Sir. It helped me a lot.

Helper II

@Maxi88 you welcome

Announcements

#### Announcing Power Apps Copilot Cookbook Gallery

We are excited to share that the all-new Copilot Cookbook Gallery for Power Apps is now available in the Power Apps Community, full of tips and tricks on how to best use Microsoft Copilot as you develop and create in Power Apps. The new Copilot Cookbook is your go-to resource when you need inspiration--or when you're stuck--and aren't sure how to best partner with Copilot while creating apps.   Whether you're looking for the best prompts or just want to know about responsible AI use, visit Copilot Cookbook for regular updates you can rely on--while also serving up some of your greatest tips and tricks for the Community. Our team will be reviewing posts using the new "Copilot" label to ensure we highlight and amplify the most relevant and recent content, so you're assured of high-quality content every time you visit. If you share a post that gets featured in the curated gallery, you'll get a PM in the Community to let you know!The curated gallery is ready for you to experience now, so visit the new Copilot Cookbook for Power Apps today: Copilot Cookbook - Power Platform Community. We can't wait to see what you "cook" up!