Are you two serious? Take a look at character display formats.
documentation.progress.com/.../index.html
Change this httOutData:add-new-field("mylogfield","character",0,"ACTIVE/INACTIVE",?,"","ACTIVE-FLAG"). into this httOutData:add-new-field("mylogfield","character",0,"x(8)",?,"","ACTIVE-FLAG"). and this bhttOutData:buffer-field(1):buffer-value = string(tablename.logfield,bhttOutData:buffer-field(1):format). into this bhttOutData:buffer-field(1):buffer-value = string(tablename.logfield,"ACTIVE/INACTIVE"). OR this httOutData:add-new-field("mylogfield","character",0,"ACTIVE/INACTIVE",?,"","ACTIVE-FLAG"). into this httOutData:add-new-field("mylogfield","LOGICAL",0,"ACTIVE/INACTIVE",?,"","ACTIVE-FLAG"). and this bhttOutData:buffer-field(1):buffer-value = string(tablename.logfield,bhttOutData:buffer-field(1):format). into this bhttOutData:buffer-field(1):buffer-value = tablename.logfield. disp string(bhttOutData:buffer-field(1):buffer-value, bhttOutData:buffer-field(1):FORMAT) tablename.logfield .
I tested it on 11.6.2, same result...strange, since if you put in a false value, Works. only true value will give wrong result.
DEF VAR b AS LOG FORMAT "Acitve/Inactive" NO-UNDO.
DEF VAR c AS CHAR FORMAT "Active/Inactive" NO-UNDO.
DEF VAR h AS HANDLE NO-UNDO.
DEF VAR bh AS HANDLE NO-UNDO.
CREATE TEMP-TABLE h.
h:ADD-NEW-FIELD("myLogField","character",0,"Active/Inactive",?,"","Active-flag").
h:TEMP-TABLE-PREPARE("tt").
bh = h:DEFAULT-BUFFER-HANDLE.
ASSIGN
b = FALSE
c = STRING(b,"Active/Inactive")
.
bh:BUFFER-CREATE().
bh::myLogField = STRING(b,bh:BUFFER-FIELD(1):FORMAT).
MESSAGE b SKIP
c SKIP
bh::myLogField SKIP
bh:BUFFER-FIELD(1):FORMAT
VIEW-AS ALERT-BOX INFO BUTTONS OK.
If you use "ON/OFF" the result With a true value will be "N".... strange
Are you two serious? Take a look at character display formats.
documentation.progress.com/.../index.html
Change this httOutData:add-new-field("mylogfield","character",0,"ACTIVE/INACTIVE",?,"","ACTIVE-FLAG"). into this httOutData:add-new-field("mylogfield","character",0,"x(8)",?,"","ACTIVE-FLAG"). and this bhttOutData:buffer-field(1):buffer-value = string(tablename.logfield,bhttOutData:buffer-field(1):format). into this bhttOutData:buffer-field(1):buffer-value = string(tablename.logfield,"ACTIVE/INACTIVE"). OR this httOutData:add-new-field("mylogfield","character",0,"ACTIVE/INACTIVE",?,"","ACTIVE-FLAG"). into this httOutData:add-new-field("mylogfield","LOGICAL",0,"ACTIVE/INACTIVE",?,"","ACTIVE-FLAG"). and this bhttOutData:buffer-field(1):buffer-value = string(tablename.logfield,bhttOutData:buffer-field(1):format). into this bhttOutData:buffer-field(1):buffer-value = tablename.logfield. disp string(bhttOutData:buffer-field(1):buffer-value, bhttOutData:buffer-field(1):FORMAT) tablename.logfield .
I first thought about giving a logical format to a character seemed a bit strange, but when I tried it, I was supprised to see that it worked, or at least pretty near working :-)
But I understand that the display format for character should not be mix with the format of a logical field :-) Thanks for the info...
Thank you for the information. It was helpful.