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 Automate / Convert integer to str...
Power Automate
Unanswered

Convert integer to string with fixed digits

(0) ShareShare
ReportReport
Posted on by 4

Hello,

 

I want to sent an email in which I want to write the value of an integer variable.

 

The problem is that I want that the numer has always two digits.

So, if the value is "11" I have no problems because it writes "11", but if the value is "7" I want to write "07".

 

How can I do?

 

Thanks.

Categories:
I have the same question (0)
  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @Quinzio 

     

    You can use compose output in Email body-

    Hardesh15_0-1602173277211.png

     you can use condition in which if value is less than 10 then use this format.

    Thanks

    Hardesh

     

  • Verified answer
    Diksha Profile Picture
    301 on at

    Hi @Quinzio,

     

    You can use Compose to check if the Value is less than 10 .
    The Compose experience should be - 

     

     

     

    if(less(variables('Value'),10),concat('0',variables('Value')),string(variables('Value')))

     

     

     

    Then set the output of Compose to new variable and use the new variable in Send an email action / You can directly use the output of Compose in Send an email action.
    FlowSnip.PNG


    Output - 


    When Value = 5When Value = 5When Value = 10When Value = 10

     

    If this answered your question, please mark this question as answered and if you liked my response, please consider giving it a thumbs up .
    Thank You !!!

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 Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard