Although designed primarily to help with the presentation of place information in reports and elsewhere, this function can however be used with any text fields. It returns one or more parts of any comma-separated text. It can also be used to 'tidy' comma-separated text by removing extra commas. And finally it can reverse the items in a comma-separated list.
See also Section.
This parameter can be used to modify the behaviour of the function.
Assuming the input text (%INDI.BIRT.PLAC%) contains "one, two, three, four, five, six, seven, eight", the following function calls will return the values shown:
=TextPart(%INDI.BIRT.PLAC%, 1, 1) | one |
=TextPart(%INDI.BIRT.PLAC%, 2) | two |
=TextPart(%INDI.BIRT.PLAC%, 4, 3) | four, five, six |
=TextPart(%INDI.BIRT.PLAC%, 5, 0) | five, six, seven, eight |
=TextPart(%INDI.BIRT.PLAC%, -1) | eight |
=TextPart(%INDI.BIRT.PLAC%, -3, 2) | five, six |
=TextPart(%INDI.BIRT.PLAC%, -2, 0) | one, two, three, four, five, six, seven |
Assuming the input text (%INDI.BIRT.PLAC%) contains "one, two,,, five, six, seven, eight", the following function calls will return the values shown:
=TextPart(%INDI.BIRT.PLAC%, 1, 0, TIDY) | one, two, five, six, seven, eight |
=TextPart(%INDI.BIRT.PLAC%, 3, 5) | ,, five, six, seven |
=TextPart(%INDI.BIRT.PLAC%, 3, 5, TIDY) | five, six, seven |
=TextPart(%INDI.BIRT.PLAC%, 3, 5, TIDY_REV) | seven, six, five |