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” |
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.
reworkneeded.. still valid.. do we have other better possibilities?