Segment Descriptive Flexfields |
In order to extract balances using the descriptive flexfields stored on the segment values you need to use special syntax in the Get Balance function. The syntax works as follows:
{1:ABC}
· You wrap the descriptive flexfield using curly brackets
· The first character after the open bracket identifies which descriptive flexfield attribute is being referred to.
· You then separate the descriptive flexfield attribute from the actual value using a “:”.
· You then specify the criteria for this attribute.
An example Get Balance function would look as follows:
=Get_Balance("Jan-02","PTD","USD","E","A","","01","{1:ABC}","1000","0000","000")
This example will return all the values where attribute 1 of the segment descriptive flexfield on segment 2 is equal to the value “ABC”.
It is possible to specify criteria for multiple descriptive flexfields as follows:
=Get_Balance("Jan-02","PTD","USD","E","A","","01","{1:ABC}{2:XX}","1000","0000","000")
Simply wrap each descriptive flexfield value in its own {} and identify the attribute number.
At this stage the descriptive flexfield criteria is restricted to a single value or a single range of values. Lists of values and multiple ranges are not supported. A range can be specified using the special range delimiter “|” (pipe character). This character is different to the range character that is used for normal Get Balance segment parameters. The reason is that the normal range delimiter “-“ may easily be used in a segment descriptive flexfields and therefore is not suitable. In future you will be able to configure your own range delimiter character which will provide the best flexibility. The range criteria can be specified as follows:
=Get_Balance("Jan-02","PTD","USD","E","A","","01","{1:100|200}","1000","0000","000")
This example will return all the values where attribute 1 of the segment descriptive flexfield on segment 2 is between 100 and 200. Date values are also supported in this criteria and GL Wand will correctly derive the “between” criteria for a date.