How to Hide Column Data of a Browser based on some condition?

Reynold

Member
Hello All,

I need one help regarding Browser Column Data hide based on some run-time condition:

i.e. In browser, we have a freeform query written and in display trigger of br_table we have few fields which we need to display in the browser.
eg. tt-abc.a column-label "Test1"
tt-abc.b column-label "Test2"
tt-abc.c column-label "Test3"

Now I want to display the 3rd column DATA - ONLY WHEN one condition is true.
i.e. if check-flag = true then only I want to display the Data for 3rd column.

when tried to put like this
tt-abc.c column-label "Test3" when check-flag = yes
I got error.

Could any one suggest how I do the above case.

Thanks.
 

jmac13

Member
try this it goes round the columns of the browse and if its "Test" and my logHide = true then it hides else shows.

Code:
define variable hanCol as handle     no-undo.
define variable logHide as logical     no-undo.

hanCol = browse brBrowse:first-column.  
                 
do while valid-handle(hanCol):                   
    if logHide and hanCol:name = "Test3" then
       hide hanCol.  
    else
        view hanCol.   
                   
    hanCol = hanCol:next-column.                   
end.
 

Reynold

Member
Thanks for your reply .. :)
But I dont want to hide the column - instead I want to hide the DATA of the column on some condition. STILL I need the column label of that column ...
And wher do i need to place this code ... I mean we need to write this on Row-display trigger of the browser ???
 

jmac13

Member
well not sure about hiding the data in the column...I'd just not have the data there when i was creating the temp table

but if its something you can set its on a row to row base then you'll have to do something in row display i think
 
Top