cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Text formatting

Hello!

 

I have a solution in powerapps what I would like to copy to power automate environment:

Powerapps:

Text("12",000) ->basically this extend my text into three digit (example: 42->042)

 

How can I solve this in power automate?

 

Thankyou

1 ACCEPTED SOLUTION

Accepted Solutions
Paulie78
Super User
Super User

You could use an expression like this:

concat
(
  if(equals(length(outputs('Text')),2), concat('0', outputs('Text')), ''),
  if(equals(length(outputs('Text')),1), concat('00', outputs('Text')), ''),
  if(greater(length(outputs('Text')),2), outputs('Text'), '')
)

You would need to replace outputs('Text') with dynamic values from your flow.

View solution in original post

3 REPLIES 3
Paulie78
Super User
Super User

You could use an expression like this:

concat
(
  if(equals(length(outputs('Text')),2), concat('0', outputs('Text')), ''),
  if(equals(length(outputs('Text')),1), concat('00', outputs('Text')), ''),
  if(greater(length(outputs('Text')),2), outputs('Text'), '')
)

You would need to replace outputs('Text') with dynamic values from your flow.

Anonymous
Not applicable

Thank you for your quic answer @Paulie78 . It is works! I am going to highlight as solution but meanwhile I found an another one what is a little bit "simpler". This connector is able to do that also.

Foxzor_0-1664438366337.png

 

Good shout, I don't know why I missed the simple solution! 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (1,366)