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 / Get base64 from split ...
Power Apps
Answered

Get base64 from split string

(1) ShareShare
ReportReport
Posted on by 997

Hello,

How can i get the image from this part?

 

 

Last(
 FirstN(
 Split(
 ThisItem.Result,
 ";"
 ),
 5 //this line contains the base64
 )
).Result

 

 

The image is a Base64 (red dot)

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4 //8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==

 

 

 

I used the above code into a image field, but nothing happens?

Thank you

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,730 Most Valuable Professional on at

    Hi @TimmyBoy ,

    Try

    Substitute(
     Index(
     Split(
     ThisItem.Result,
     ";"
     ),
     5
     ).Result,
     ":",
     ":"
    )
    

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • TimmyBoy Profile Picture
    997 on at

    Hello @WarrenBelz 

    Weird, no image is loading...

    TimmyBoy_0-1674620325463.png

    I check the sharepoint list and image field is multi text and plain text...

  • WarrenBelz Profile Picture
    156,730 Most Valuable Professional on at

    Hi @TimmyBoy ,

    Please see belowBase64Picture.jpg

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • TimmyBoy Profile Picture
    997 on at

    Hello @WarrenBelz 

    I guess we are doing something completely wrong?

    TimmyBoy_0-1674622341183.png

    Still no image 😞

     

    okay, i have added the plain code

    TimmyBoy_0-1674622701324.png

    But i had to change the : with :

    That works, but not into my split code 😞

  • WarrenBelz Profile Picture
    156,730 Most Valuable Professional on at

    @TimmyBoy ,

    The Substitute will work as well (it does what you have manually) - I think you need a bit of debugging here to work out what text your code outputs.

  • Bilakanti Profile Picture
    1,226 on at

    @TimmyBoy what @WarrenBelz  mentioned in the post should work like a charm. Just substitute should work

  • TimmyBoy Profile Picture
    997 on at

    Hello @WarrenBelz and @Bilakanti 

    Yeah i think @WarrenBelz has a point

    I have to look into it, and i will be back soon 😉 i must be doing something wrong in my split code i guess 😞

    Thank you

  • TimmyBoy Profile Picture
    997 on at

    @WarrenBelz 

    Weird, nothing helps...

    Change the position, remove all other parts so i just keep the base64

    But nope

    TimmyBoy_0-1674672058270.png

    Funny part is if i use your code

    TimmyBoy_2-1674672200573.png

    The image is loading without troubles...

    I really don't get it where it will go wrong 😞

     

  • WarrenBelz Profile Picture
    156,730 Most Valuable Professional on at

    @TimmyBoy ,

    Have you put both pieces of code as the Default of a couple of Text Boxes, then copied both into Notepad and see if they line up ?

  • TimmyBoy Profile Picture
    997 on at

    Hello @WarrenBelz 

    Ok i have cut them

    but seems the image isn't working

    even i must say the image don't convert correct

    TimmyBoy_0-1674693187657.png

    It only Shows data&colon

    I think it's not working because i split the ;

    and i see in the base64 it have also a ; here

    image/png;

    maybe that's why he cuts it, and never makes the image

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 360 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 325

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard