What i have:
I created a dynamic browse with as data-source a temp-table.
code:
CREATE BUFFER table-name FOR TABLE "tt_productie".
CREATE QUERY dyn-query.
dyn-query:SET-BUFFERS(table-name).
CREATE BROWSE dyn-browse-prod
ASSIGN WIDTH = 71
HEIGHT = 12
EXPANDABLE = FALSE
COLUMN = 1
ROW = 1
FRAME = FRAME frm_prod:HANDLE
READ-ONLY = TRUE
SENSITIVE = TRUE
SEPARATORS = TRUE
ROW-MARKERS = TRUE
VISIBLE = TRUE
COLUMN-RESIZABLE = TRUE
TRIGGERS:
ON ROW-DISPLAY PERSISTENT RUN prodCol.
END.
dyn-browse-prod:QUERY = dyn-query.
query-value = "For each tt_productie by dept by tiknr"
dyn-query:QUERY-PREPARE(query-value).
ASSIGN v_list = "tt_productie.keynr,tt_productie.dept,tt_productie.machine,tt_productie.tiknr,tt_productie.action,tt_productie.prodtijd,tt_productie.prodstil,tt_productie.totaal".
DO cntr = 1 TO NUM-ENTRIES(v_list, ","):
col-handle = dyn-browse-prod:ADD-LIKE-COLUMN(ENTRY(cntr,v_list,",")).
col-handle:READ-ONLY = TRUE.
IF cntr = 1
THEN col-handle:VISIBLE = FALSE.
CASE cntr:
WHEN 2 THEN col-handle:WIDTH = 6.
WHEN 3 THEN col-handle:WIDTH = 13.
WHEN 4 THEN col-handle:WIDTH = 7.
OTHERWISE col-handle:WIDTH = 8.
END CASE.
END.
dyn-query:QUERY-OPEN().
APPLY "home" TO dyn-browse-prod.
I think i need to do the colorchange in the "on-row-display" event.
here i need to check whether the value of the key-field (first column in the browse) of the row to display is available in a comma-seperated list. If so, the color of that row needs to change.
Can anybody give me a hint about this?
Thanks a lot!
Kind regards,
Elise
I created a dynamic browse with as data-source a temp-table.
code:
CREATE BUFFER table-name FOR TABLE "tt_productie".
CREATE QUERY dyn-query.
dyn-query:SET-BUFFERS(table-name).
CREATE BROWSE dyn-browse-prod
ASSIGN WIDTH = 71
HEIGHT = 12
EXPANDABLE = FALSE
COLUMN = 1
ROW = 1
FRAME = FRAME frm_prod:HANDLE
READ-ONLY = TRUE
SENSITIVE = TRUE
SEPARATORS = TRUE
ROW-MARKERS = TRUE
VISIBLE = TRUE
COLUMN-RESIZABLE = TRUE
TRIGGERS:
ON ROW-DISPLAY PERSISTENT RUN prodCol.
END.
dyn-browse-prod:QUERY = dyn-query.
query-value = "For each tt_productie by dept by tiknr"
dyn-query:QUERY-PREPARE(query-value).
ASSIGN v_list = "tt_productie.keynr,tt_productie.dept,tt_productie.machine,tt_productie.tiknr,tt_productie.action,tt_productie.prodtijd,tt_productie.prodstil,tt_productie.totaal".
DO cntr = 1 TO NUM-ENTRIES(v_list, ","):
col-handle = dyn-browse-prod:ADD-LIKE-COLUMN(ENTRY(cntr,v_list,",")).
col-handle:READ-ONLY = TRUE.
IF cntr = 1
THEN col-handle:VISIBLE = FALSE.
CASE cntr:
WHEN 2 THEN col-handle:WIDTH = 6.
WHEN 3 THEN col-handle:WIDTH = 13.
WHEN 4 THEN col-handle:WIDTH = 7.
OTHERWISE col-handle:WIDTH = 8.
END CASE.
END.
dyn-query:QUERY-OPEN().
APPLY "home" TO dyn-browse-prod.
I think i need to do the colorchange in the "on-row-display" event.
here i need to check whether the value of the key-field (first column in the browse) of the row to display is available in a comma-seperated list. If so, the color of that row needs to change.
Can anybody give me a hint about this?
Thanks a lot!
Kind regards,
Elise