Skip to main content

Notifications

Community site session details

Community site session details

Session Id : JfPuOgIiUGRakCy+t9tiNt
Power Apps - Building Power Apps
Unanswered

Decode Base64 value in PowerApps

Like (0) ShareShare
ReportReport
Posted on 1 Mar 2023 14:08:41 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:
  • TheRobRush Profile Picture
    11,121 Super User 2025 Season 1 on 02 Mar 2023 at 05:52:13
    Re: Decode Base64 value in PowerApps

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

  • DBTS7 Profile Picture
    on 02 Mar 2023 at 05:32:03
    Re: Decode Base64 value in PowerApps

    Hi,

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

    Thanks

  • TheRobRush Profile Picture
    11,121 Super User 2025 Season 1 on 02 Mar 2023 at 05:30:13
    Re: Decode Base64 value in PowerApps

    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 02 Mar 2023 at 04:55:49
    Re: Decode Base64 value in PowerApps

    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,121 Super User 2025 Season 1 on 02 Mar 2023 at 03:00:26
    Re: Decode Base64 value in PowerApps

    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 02 Mar 2023 at 02:25:38
    Re: Decode Base64 value in PowerApps

    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,121 Super User 2025 Season 1 on 01 Mar 2023 at 19:37:25
    Re: Decode Base64 value in PowerApps

    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

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 78 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 49

#3
mmbr1606 Profile Picture

mmbr1606 41 Super User 2025 Season 1

Overall leaderboard