mscrm-addons.com - Blog

IMPORTANT INFORMATION

This blog is deprecated since July 2020.The articles below are no longer maintained and might contain outdated information. 
You can find the most acutal and relevenat information in our Knowledge Base at support.mscrm-addons.com

News.mscrm-addons.com Blog

rss

Hello and welcome to our blog! What can we do for you? Are you looking for further technical information or step-by-step instructions to our products? Or would you like to read the latest news on mscrm-addons? Please feel free to browse our blog for detailed information and to share our posts!


The code behind the ordinals field function (Advanced)

The following information provides you with a technical description of the ordinals field functionality. For further information on the functionality itself, please have a look at this article. 

This is how the function looks like: 

 

The below table describes what happens behind the scenes. The left column contains a structure chart that visualizes the procedure. The two columns on the right contain examples that run parallel to the structure chart and intend to help to understand the algorithm. 

SET date field to internal variable “day” with the formatting “d”
(the “d” formatting only displays the day as a number; (this would also work with actual number fields and might require no or a different formatting)

Example “createdon” with the value “11/24/2016” and the switch formatting d results in “24”

Example “createdon” with the value “11/3/2016” and the switch formatting d results in “3”

SHOW day

24

3

SET the helper variable “goon” to 0

“goon” is 0

“goon” is 0

CALCULATE the module of day by 100 and store the result in variable “result1”

“result1” is 24

“result1” is 3

CALCULATE the module of day by 10 and store the result in variable “result2”

“result2” is 4

“result2” is 3

IS “result1” equal “11”

No

No

Yes

No

No

No

Print “th”

IS “result1” equal “12”

Yes

No

No

No

Print “th”

IS “result1” equal “13”

Yes

No

“goon” is 1

“goon” is 1

Print th”

SET the helper variable “goon” to 1

IF “goon” is equal to “1”

Yes

Yes

No

Yes

No

No

Nothing

IS “result2” equal “1”

Yes

No

Nothing

Nothing

Print st”

Nothing

IS “result2” equal “2”

No

No

Yes

No

Nothing

Nothing

Print nd”

Nothing

IS “result2” equal “3”

No

Yes

Yes

No

Nothing

Print “rd”

Print rd”

Noting

IS “result2” higher than “3”

Yes

No

Yes

No

Print “th”

Nothing

Print th”

Nothing

  

That's it! We appreciate your feedback! Please share your thoughts by sending an e-Mail to support@mscrm-addons.com




Comments are closed.