简体   繁体   English

退出单元格时如何在浏览进度中自动填充单元格

[英]How to auto-populate cells in browse progress when exiting a cell

example: 例:

I have a browse with the columns "Code item", "Item description". 我使用“代码项”,“项目描述”列进行浏览。 When placing the apos fill the code of the item automatically fills the cell with the description of the item of a temp-table. 当放置撇号填充时,该项的代码会自动用临时表项的描述填充单元格。

Anyone know how I do this? 有人知道我该怎么做吗?

You want to auto-fill the description column after the user enters something in the code column? 您要在用户在代码列中输入内容后自动填充描述列吗? You can do that using an ON LEAVE trigger on the browser. 您可以使用浏览器上的ON LEAVE触发器来做到这一点。 Here is an example that copies the code column to the description column when the user leaves the code. 这是一个在用户离开代码时将代码列复制到描述列的示例。 You can also use ON VALUE-CHANGED to update the description as the user types the code. 您还可以在用户键入代码时使用ON VALUE-CHANGED更新描述。

DEFINE TEMP-TABLE ttBrs NO-UNDO
    FIELD Code AS CHARACTER
    FIELD Descr AS CHARACTER.

DEFINE QUERY qBrs FOR ttBrs SCROLLING.

DEFINE BROWSE brs1
    QUERY qBrs DISPLAY
        ttBrs.Code COLUMN-LABEL "Code Item"
        ttBrs.Descr COLUMN-LABEL "Item Description"
        ENABLE ttBrs.Code ttBrs.Descr
    WITH NO-ROW-MARKERS SEPARATORS SIZE 80 BY 10 FONT 4 FIT-LAST-COLUMN.

ON LEAVE OF ttBrs.Code IN BROWSE brs1
DO:
    ttBrs.Descr:SCREEN-VALUE IN BROWSE brs1 = ttBrs.Code:SCREEN-VALUE.
END.

DEFINE FRAME fFrame
    brs1 AT ROW 1 COL 1
    WITH VIEW-AS DIALOG-BOX SCROLLABLE.

CREATE ttBrs.

VIEW FRAME fFrame.
OPEN QUERY qBrs FOR EACH ttBrs.
brs1:SENSITIVE = TRUE.

WAIT-FOR "GO" OF FRAME fFrame.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM