Skip to main content

Notifications

Convert Number to Ordinal Using Microsoft Flow

Implementation Steps:

 

1. Open https://flow.microsoft.com

 

2. Click New Flow

 

3. Select Manually Trigger Flow

 

rampprakash_0-1642867085171.png

 

4. Add a Number Parameter

 

5. Click Add and Add Compose

 

rampprakash_1-1642867126845.png

 

 

 

if(endsWith(string(triggerBody()['number']),'11'),formatNumber(triggerBody()['number'], '#th'),
if(endsWith(string(triggerBody()['number']),'12'),formatNumber(triggerBody()['number'], '#th'),
if(endsWith(string(triggerBody()['number']),'13'),formatNumber(triggerBody()['number'], '#th'),
if(endsWith(string(triggerBody()['number']),'1'),formatNumber(triggerBody()['number'], '#st'),
if(endsWith(string(triggerBody()['number']),'2'),formatNumber(triggerBody()['number'], '#nd'),
if(endsWith(string(triggerBody()['number']),'3'),formatNumber(triggerBody()['number'], '#rd'),
formatNumber(triggerBody()['number'], '#th')))))))

 

 

 

6. Add Respond to the Flow with the OUTPUT 

 

rampprakash_2-1642867205850.png

 

Sample:

 

rampprakash_3-1642867250754.png

 

 

Thanks to @Expiscornovus 

Comments

*This post is locked for comments