web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Slice Variable using i...
Power Apps
Unanswered

Slice Variable using index position in PowerApps.

(0) ShareShare
ReportReport
Posted on by

I want to read values from Barcode, after that I have to split that data into 3 Pieces so that I can use that sliced data into editable text fields.
For example:
Barcode Reader Values--> (123)012121(10)12334
Now I need to get "12121" & "12334" to insert in some text field.

Can anyone help me with this how can I get my work done? I didn't find anything to get the values from particular index position of a variable.

Thanks in Advance!!

Categories:
  • CarlosFigueira Profile Picture
    Microsoft Employee on at

    If you know the position within the text where you want to extract the values, you can use the Mid function. In this example, if the barcode reader returns the text "(123)012121(10)12334", you can set a couple of variables as such, and use those variables as the Default property of your text input controls:

    Set(part1, Mid(var, 7, 5));
    Set(part2, Mid(var, 16, 5))

    Hope this helps!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 223

Last 30 days Overall leaderboard