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 / Decode Base64 value in...
Power Apps
Unanswered

Decode Base64 value in PowerApps

(0) ShareShare
ReportReport
Posted on by

Hi,

I'm having a mailId column in sql server which is encoded to Base64 and now I want to decode it to String in Powerapps and show the mailId in gallery in Powerapps.

Is it possible to do?

Thanks

Categories:
I have the same question (0)
  • TheRobRush Profile Picture
    11,128 Moderator on at

    Ok Here we go.

     

    In an app I place a label and give it the text Value of

    "SGVsbG8gV29ybGQ="

     

    Then hop over to PowerAutomate, click Create > Instant Cloud Flow, and select PowerApps

     

    When this opens, delete the top step, PowerApps, it will give you a warning, throw caution to the wind and continue anyways.

     

    Now click the + at top, and search for powerapps, and select PowerApps (V2) Give this a text option in it, and give  it a name you liek.

     

    click + again and search for initialize variable. Set its name to whatever you want, mines 64String, Type is string, and Value click in the box and then on the right clicjk expression, start typing base, and select base64 to string, once clicked type a ( and it will automatically Put ()  click inside those and then just above to left select dynamic content and choose the base64 output from the powerapps step 1shoudl look similar to this when done

    base64ToString(triggerBody()['text'])

    TheRobRush_1-1677699051267.png

     

    Next click + again and choose respond to a powerapp or flow

     

    add a text, and give  it the value of output of our previous step.

     

    whole thing when done looks like this

     

     

    TheRobRush_0-1677698987469.png

     

    Save this flow, then exit it and make sure its turned on, turn it on if not

     

    Now go back to powerapps.

     

    add a flow,

    TheRobRush_2-1677699291499.png

     

    now add a button, and make it's OnSelect

    ///Label17.Text is where I pasted my base64 Code to test
    ///.yourstring yourstring is name of the returned variable we setup in our flow
    UpdateContext({new64string:'64toString'.Run(Label17.Text).yourstring})

     

    now anywhere in the app you can reference new64string and it will show you the decoded base64, in my example you will get,

     

    Hello, World

  • DBTS7 Profile Picture
    on at

    Hi @TheRobRush , 

    it's totally working correctly, thanks for the answer.

    But like my encode values is in gallery and it is not encoding gallery data, then what should i choose for this?

    I'm new to automate flows, so don't know what triggers or actions to choose.

    Thanks

  • TheRobRush Profile Picture
    11,128 Moderator on at

    Show me what you mean. Assuming your source is in a splist or dataverse list and being displayed in a gallery in powerapps? If so put the button in your gallery, and replace the label part with thisitem.whatevercolumnthebase64isin

  • DBTS7 Profile Picture
    on at

    Hi @TheRobRush ,

    I don't want to add a button inside a gallery (as it is not a requirement).

    I want if I click on button (which is outside a  gallery), then it'll decode base64 value to it's original value.

    It's look like this:

    DBTS7_0-1677732907353.png

    I'm getting encoded values from Sql server. 

  • TheRobRush Profile Picture
    11,128 Moderator on at

    Yes but if the base64 code is in a gallery of items and the button is outside of this gallery how will the button know which record in your gallery of items to reference?

  • DBTS7 Profile Picture
    on at

    Hi,

    Yes agree, but I want to encode all of them at once, if possible.

    Thanks

  • TheRobRush Profile Picture
    11,128 Moderator on at

    Oh, how many records at any one given time? Going to have to be filtered and under delegation limit then passed through a forall

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard