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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / String interpolation
Power Apps
Answered

String interpolation

(1) ShareShare
ReportReport
Posted on by

Hello! I have a app that reads a qr code and the  string that looks like this 

SO:0000522715REG:EB40058FORSIKRING:IF SKADEFORSIKRINGJOBB:5LAGERSTED:080 

I want to be able to split the string into this 
SO:0000522715
REG:EB40058
FORSIKRING: IF FORSIKRING 
JOBB:5

LAGERSTED:080

The values before : are always static the other values after : are dynamic 

I need to extract those values after the ":" and Place them into textfields 

ANy idea how this can be done `?

Categories:
I have the same question (0)
  • iAm_ManCat Profile Picture
    18,228 Most Valuable Professional on at

    Hi!

     

    If your values are dynamic and theres no separator, then it becomes difficult to do but not impossible.

    We will split it by the Static text elements such as REG: and then use First and Last to split those out into values.

     

    The following formula will split the text up using the static elements and then output the text you requested:

     

    With(
     {
     BaseValue: Label5.Text,
     FirstSplit: Split(Last(Split(Label5.Text, "SO:")).Result, "REG:")
     },
     "SO:" & First(FirstSplit).Result & Char(10) &
     With(
     {
     SecondSplit: Split(Last(FirstSplit).Result, "FORSIKRING:")
     },
     "REG:" & First(SecondSplit).Result & Char(10) &
     With(
     {
     ThirdSplit: Split(Last(SecondSplit).Result, "JOBB:")
     },
     "FORSIKRING:" & First(ThirdSplit).Result & Char(10) & 
     With(
     {
     FourthSplit: Split(Last(ThirdSplit).Result, "LAGERSTED:")
     },
     "JOBB:" &First(FourthSplit).Result & Char(10) & Char(10) & 
     "LAGERSTED:" & Last(FourthSplit).Result
     )
     )
     )
    )

     

    Could you please give this a try, replacing Label5.Text with your result from your QR code, and then let me know if you run into any issues?

     

    Thanks,

    Sancho

  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    I have alrdy fixed this. I did First(Match(scanValue;"JOBB:(.+)LAGERSTED:";MatchOptions.Contains).SubMatches).Value

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard