We want to set data selection as follows on a Find/Browse form using Event Rules, how can we perform this?
We have tried as follows,
Set Selection (Order Type = 'SO')
AND Set Selection (Order Type = 'SP')
OR Set Selection (Address Number='123')
AND Set Selection (Address Number='456')
But the result is not correct.
Detail implementation is,
Set Selection (FC Grid, F4201.DCTO, <equal>,'SO',<AND>)
Set Selection (FC Grid, F4201.DCTO, <equal>,'SP',<AND>)
Set Selection (FC Grid, F4201.AN8, <equal>,'4242',<OR>)
Set Selection (FC Grid, F4201.AN8, <equal>,'4245',<AND>)
Actual statement constructed by the EnterpriseOne tools set is:
SQL> SELECT * FROM PRODDTA.F4201 WHERE DCTO = 'SO' AND DCTO = 'SP' OR AN8 = 4242 AND AN8 = 4245;
This query will not yield any value as there is no data which is SO and SP or 4242 and 4245 for a single row of F4201 against columns DCTO and AN8 respectively.
There are two possible implementations for this:
Determine actual query that is desired, for example,
SQL> SELECT * FROM PRODDTA.F4201 WHERE DCTO IN ('SO', 'SP') OR AN8 IN (4242, 4245);
Or above expectation can be translated as below,
{DCTO = 'SO' AND (AN8 = 4242 OR AN8 = 4245)} AND {DCTO = 'SP' AND (AN8 = 4242 OR AN8 = 4245)}
Conventionally which can be implemented as below,
But this implementation is not a cost-effective data fetch in the Web / HTML client. So, possibly you may to implement as below,
1. Let the EnterpriseOne tool set filter data using Filter Option for FC control
2. Call the System Function 'Set Selection()' for additional selection
1. Create FC Variable with validation logic
2. Call system function 'Set Selection()' and 'Set Selection Group()'
SQL> SELECT * FROM PRODDTA.F4201 WHERE DCTO = 'FC DCTO' AND (AN8 = 4242 OR AN8 = 4245);