How to put fields currently displayed in a message into a frame?

Discussão em 'StackOverflow' iniciado por fdantas, Maio 16, 2016.

  1. fdantas

    fdantas Administrator Moderador

    This is simply Maintenance program , in this, it asks for item number and displays the empty fields for regarding that item number record in the table. Here I am able to display the empty fields through the message but I want those fields to be displayed in another frame and it asks for the update if I update there it should be updated in the pt_mstr table.

    I tried to like this , can you please help me to complete this program?

    /*Sample Item master Maintenance Program*/
    /* DISPLAY TITLE */
    {us/mf/mfdtitle.i "3+ "}
    DEFINE VARIABLE hBuffer AS HANDLE NO-UNDO.
    DEFINE VARIABLE i AS INTEGER NO-UNDO.
    DEFINE VARIABLE hField AS HANDLE NO-UNDO.
    form
    pt_part colon 25
    with frame a side-labels width 80.
    /* SET EXTERNAL LABELS */
    setFrameLabels(frame a:handle).


    /* DISPLAY */
    view frame a.
    repeat with frame a:
    prompt-for pt_part
    editing:`

    /* FIND NEXT/PREVIOUS RECORD */
    {us/mf/mfnp.i pt_mstr pt_part "pt_mstr.pt_domain = global_domain and pt_part" pt_part pt_part pt_part }

    if recno <> ? then
    display
    pt_part.

    find pt_mstr where pt_part = input pt_part and pt_domain=global_domain.
    ASSIGN hBuffer = BUFFER pt_mstr:HANDLE.
    DO i = 1 TO hBuffer:NUM-FIELDS:
    ASSIGN hField = hBuffer:BUFFER-FIELD (i).
    IF hField:DATA-TYPE = "CHARACTER" AND (hField:BUFFER-VALUE = "" OR hField:BUFFER-VALUE = ?) THEN
    MESSAGE hField:NAME "is empty"
    VIEW-AS ALERT-BOX.
    end.end. end.

    Continue reading...

Compartilhe esta Página