E9.2 QBE in Grid column which is a DD item

Vidushi

Member
Hi all,

There is a column in the Grid which is not part of the Business View and its a DD item(EV01) instead. That Grid column value i am assigning in the Write Grid Line-Before event according to some logic. So the requirement first came to enable QBE for that column but we said that is not possible.
Then we suggested we can have a Radio button in the form and filter record based on selection (3 radio buttons - Both , Y , N). But then again issue came that how i will filter the values. I tried using "Hide Grid Row" system function but that's not working.
Can someone suggest me how i can achieve this requirement? Is this possible to filter a DD item column?

Thanks in Advance.
 

DSauve

Legendary Poster
For grid columns that are not tied to a business view, you can filter them by adding a filter field to the form header, and then manually coding the filtering in the event rules for the grid. So you can do it, but there's some coding involved.
 

Vidushi

Member
For grid columns that are not tied to a business view, you can filter them by adding a filter field to the form header, and then manually coding the filtering in the event rules for the grid. So you can do it, but there's some coding involved.
Can you please tell me the code involved and also in which event it has to be written?
 

Rauf

VIP Member
Hi Vidhushi.

You can do as follows.
But if you are dealing with a large number of records, manually hiding the records might have performance issue.
So if the application is custom, and you save the EV01 column in some of the tables (say F55TabB) , join the master table (say F55TabA) with the F55TabB. So that you can provide it the grid.

=======================================================================
FORM: Hide/ Show Test [HEADERLESS DETAIL] (W59DEM01B)
=======================================================================
CONTROL: FORM
EVENT: Write Grid Line-Before
-----------------------------------------------------------------------
0001 //
0002 //
0003 // Set Pay Status to <blank>
0004 GC PaySt = ""
0005 // Get Pay Status from Employee Master
0006 // In your case, EV01 field
0007 F060116.Fetch Single
GC Address Number = TK Address Number
GC Pay St <- TK Employee Pay Status
0008 //
0009 // If the employee is terminated, hide the record.
0010 If GC PaySt is equal to "T"
0011 Hide Grid Row(FC Grid, <Currently Selected Row>)
0012 End If

Thursday December 23, 2021 08:41
 
Last edited:

Vidushi

Member
Hi Vidhushi.

You can do as follows.
But if you are dealing with a large number of records, manually hiding the records might have performance issue.
So if the application is custom, and you save the EV01 column in some of the tables (say F55TabB) , join the master table (say F55TabA) with the F55TabB. So that you can provide it the grid.

=======================================================================
FORM: Hide/ Show Test [HEADERLESS DETAIL] (W59DEM01B)
=======================================================================
CONTROL: FORM
EVENT: Write Grid Line-Before
-----------------------------------------------------------------------
0001 //
0002 //
0003 // Set Pay Status to <blank>
0004 GC PaySt = ""
0005 // Get Pay Status from Employee Master
0006 // In your case, EV01 field
0007 F060116.Fetch Single
GC Address Number = TK Address Number
GC Pay St <- TK Employee Pay Status
0008 //
0009 // If the employee is terminated, hide the record.
0010 If GC PaySt is equal to "T"
0011 Hide Grid Row(FC Grid, <Currently Selected Row>)
0012 End If

Thursday December 23, 2021 08:41
Hi Rauf,

Previously also i tried "Hide Grid Row" system function in Write Grid line Before but its not working but now it worked. I did not add that column in the BSVW as of now, if any performance issue arises i will do that.
Thanks for your help.
 
Top