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 / String interpolation
Power Apps
Answered

String interpolation

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

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,256 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
    Microsoft Employee 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 352 Most Valuable Professional

#2
11manish Profile Picture

11manish 192

#3
Valantis Profile Picture

Valantis 128

Last 30 days Overall leaderboard