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
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,499)