Convert Number to Ordinal Using Microsoft Flow
Ram Prakash
5,055
Implementation Steps:
1. Open https://flow.microsoft.com
2. Click New Flow
3. Select Manually Trigger Flow
4. Add a Number Parameter
5. Click Add and Add Compose
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
Sample:
Thanks to @Expiscornovus
*This post is locked for comments