Is browser column enabled?

Posted by ksv on 13-Jul-2009 04:04

Is it possible to detect in runtime whether a browser column is sensitive?

In the following snippet I can't detect whether f2 is sensitive or not because SENSITIVE is somehow not a queryable attribute for a column.

DEFINE TEMP-TABLE tt NO-UNDO
   FIELD f1 AS CHARACTER
   FIELD f2 AS CHARACTER
.

CREATE tt. f1 = "AAA".
CREATE tt. f1 = "BBB".

OPEN QUERY q FOR EACH tt.


DEF BROWSE br
   QUERY q
   DISPLAY f1 f2
   ENABLE f2
   WITH SIZE 50 BY 10.

FORM br WITH FRAME f.

ENABLE ALL WITH FRAME f.

/* I get a warning here:  **SENSITIVE is not a queryable attribute for FILL-IN f2. (4052) */

MESSAGE f2:SENSITIVE IN BROWSE br
   VIEW-AS ALERT-BOX INFO BUTTONS OK.

WAIT-FOR GO OF FRAME f.

Any workarounds are appreciated!

All Replies

Posted by ksv on 13-Jul-2009 06:36

Well It seems I managed to figure it out, though it wasn't a piece of cake. According to the manual

"The COLUMN-READ-ONLY attribute of the browse column corresponds to the READ-ONLY attribute of the fill-in, while the READ-ONLY attribute of the browse column corresponds to the SENSITIVE attribute of the fill-in."
So if you want to make a column disabled you should set READ-ONLY to yes otherwise it'll be enabled. As you can see it looks very confusing but it works.

This thread is closed