Hi everyone,
I am new to Progress OpenEdge.
I'm trying to get sortof like caption of the field from an array fields, in this case it was the LABEL or; COLUMN-LABEL from a field.
here is my code:
DEFINE VARIABLE i AS INTEGER NO-UNDO. DEFINE VARIABLE j AS INTEGER NO-UNDO. DEFINE VARIABLE hFld AS HANDLE NO-UNDO. DEFINE VARIABLE bfHandle AS HANDLE NO-UNDO. DEFINE VARIABLE qrHandle AS HANDLE NO-UNDO. CREATE BUFFER bfHandle FOR TABLE "tt-table". CREATE QUERY qrHandle. qrHandle:SET-BUFFERS( bfHandle ). qrHandle:QUERY-PREPARE( "FOR EACH tt-table" ). qrHandle:QUERY-OPEN(). qrHandle:GET-FIRST( NO-LOCK ). DO i = 1 TO ( bfHandle:NUM-FIELDS ): hFld = bfHandle:BUFFER-FIELD(i). /* handle the field */ IF ( hFld:EXTENT > 0 ) THEN /* field is an array */ DO: DO j = 1 TO hFld:EXTENT: MESSAGE hFld:BUFFER-VALUE(j) VIEW-AS ALERT-BOX INFO. /* this is the field value of an array field */ --> MESSAGE hFld:COLUMN-LABEL(j) VIEW-AS ALERT-BOX INFO. /* this is what i am trying to get for */ END. END. END.
Is it possible for me to get the LABEL or COLUMN-LABEL or NAME of an Array field?
Any help and answer would be appreciated.
Thank you.
Inside a buffer (db table or temp-table) there is only on label/colum-label for each field... it's still only one field even if it's data type it's an array right?
However, when used in a form each can have different label but that is a property of the widget (fill-in, combo, whatever) not of the associated buffer field.
Inside a buffer (db table or temp-table) there is only on label/colum-label for each field... it's still only one field even if it's data type it's an array right?
However, when used in a form each can have different label but that is a property of the widget (fill-in, combo, whatever) not of the associated buffer field.
[quote user="khaidirdedy"]
Is it possible for me to get the LABEL or COLUMN-LABEL or NAME of an Array field?
[/quote] Yes - you'll be using the NAME, LABEL, COLUMN-LABEL attribute of the field but without the index argument. MESSAGE hFld:COLUMN-LABEL VIEW-AS ALERT-BOX INFO. If you care about the [1] on the column-label, you'll have to add that yourself.Yes, and it's conclude me that each of the array field is not an object of field, since we cannot get it's own property when we pass it as a parameter into another CLASS or PROCEDURE.
thank you, for your respond.