cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Talha
Level: Powered On

Use of If and substring expression in MS flow

Hi all,

 

i am having a two digit number ( variable) in compose output as 05, 45 etc

 

i need to check the second digit (red color), if second digits is Zero (0) then i need to remove the zero and use first digit.

if second digits is not zero then i need to use both digit.

 

i have tryed using expression in flow, but its show error message as The Expression is Invalid. the expression is 

if(substring(outputs('Compose'),0,1) = 0,substring(outputs('Compose'),1,1),outputs('Compose'))

please tell me what is wrong in my coding.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Use of If and substring expression in MS flow

Why make things complicated?

 

the following expression will remove any leading 0s

 

int(outputs('Compose'))
 
 
1 REPLY 1
Super User
Super User

Re: Use of If and substring expression in MS flow

Why make things complicated?

 

the following expression will remove any leading 0s

 

int(outputs('Compose'))
 
 

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 264 members 5,713 guests
Recent signins:
Please welcome our newest community members: