Descriptive Flexfield Criteria
Descriptive Flexfield Criteria
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.
Please see the various Get Balance function examples below.
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.
Single Descriptive Flexfield
An example Get Balance function for a single descriptive flexfield value 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”.
Multiple Descriptive Flexfield
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.
Range Descriptive Flexfield
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.
AND Statement for Multiple Descriptive Flexfields
A combination of descriptive flexfield values can be entered. By using a plus (addition) sign between two descriptive flexfields we can return results that meet both the first and second set of criteria.
=Get_Balance(“Jan-02″,”PTD”,”USD”,”E”,”A”,””,”01″,”{1:ABC}+{2:XX}”,”1000″,”0000″,”000″)
This example will return all the values where attribute 1 of the segment descriptive flexfield on segment 2 is equal to “ABC” AND where attribute 2 of the same segment is equal to “XX”.
Advanced Combination Descriptive Flexfield
A combination of the above delimiters and formats can be used to meet advanced criteria.
Range plus OR statement
=Get_Balance(“Jan-02″,”PTD”,”USD”,”E”,”A”,””,”01″,”{1:ABC|DFG},{2:XX}”,”1000″,”0000″,”000″)
Range plus AND statement
=Get_Balance(“Jan-02″,”PTD”,”USD”,”E”,”A”,””,”01″,”{1:ABC|DFG}+{2:XX}”,”1000″,”0000″,”000″)
Range plus exclusion of single value
=Get_Balance(“Jan-02″,”PTD”,”USD”,”E”,”A”,””,”01″,”{1:ABC|DFG},~{2:XX}”,”1000″,”0000″,”000″)