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. The descriptive flexfield criteria can include single value or a list or range of values. The delimiter characters used with descriptive flexfield ranges and lists can be configured independently from the normal delimiters for segment values. This ensures that you can choose a character that does not conflict with the data in your descriptive flexfields. See the System Administrator Delimiter Options. An example using a range criteria is 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.
The Get Balance wizard has functionality to assist with building the DFF criteria in the correct syntax. Click the button for the applicable segment and the DFF criteria wizard will be displayed.