Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Removes quotes from text string

Posted on by

Hi all

 

I'm trying to pass B64 image data to a html for an email, but the variable is getting set with quote marks:

 

Set(B64image,JSON(UploadedImage1.Image,JSONFormat.IncludeBinaryData))

the result is ...

background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA

 

How can i remove those quotes?

Categories:
  • timl Profile Picture
    timl 31,946 on at
    Re: Removes quotes from text string

    You're welcome, glad to help!

  • P_jones Profile Picture
    P_jones on at
    Re: Removes quotes from text string

    I’ve sorted it now - it was a bug in the html code. 
    Image is far too big but I’ll sort that. 

    this is basically a bolt on to the shoutout app so the image displays right there in the email body instead of an attachment 

     

    thanks for helping!!

  • timl Profile Picture
    timl 31,946 on at
    Re: Removes quotes from text string

    I'm glad that works. Strange the HTML doesn't display the image. I assume the image displays OK through the image control?

  • P_jones Profile Picture
    P_jones on at
    Re: Removes quotes from text string

    awesome thanks that worked, was just missing a comma

    Set(B64image,
     Substitute(JSON(UploadedImage1.Image , IncludeBinaryData),
     """",""
     )
    )

    oddly the html still doesn't display the image though, which is odd! 

  • Verified answer
    timl Profile Picture
    timl 31,946 on at
    Re: Removes quotes from text string

    Hi @P_jones 

    This should remove the double quotes for you.

    Set(B64image,
     Substitute(JSON(UploadedImage1.Image , IncludeBinaryData)
     """",""
     )
    )

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,297

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,890

Leaderboard