Skip to main content

[archive] Lookup in Grid

  • June 5, 2009
  • 8 replies
  • 0 views

[Migrated content. Thread originally posted on 05 June 2009]

I am developing a program where the user will be presented data records in a grid. How can I offer a look up procedure for a specific column, For example one column contains customer numbers which the user can change but he needs a look up procedure to see a list of valid numbers. Any Ideas?

8 replies

[Migrated content. Thread originally posted on 05 June 2009]

I am developing a program where the user will be presented data records in a grid. How can I offer a look up procedure for a specific column, For example one column contains customer numbers which the user can change but he needs a look up procedure to see a list of valid numbers. Any Ideas?
We do it with the use of either a push button or a function key.
In fact the push button has the same exception value as the function key, this then gets captured in the exception other procedure of the grid.

[Migrated content. Thread originally posted on 05 June 2009]

I am developing a program where the user will be presented data records in a grid. How can I offer a look up procedure for a specific column, For example one column contains customer numbers which the user can change but he needs a look up procedure to see a list of valid numbers. Any Ideas?
You could capture a right or left click on the column heading and give a drop down menu of options

[Migrated content. Thread originally posted on 05 June 2009]

I am developing a program where the user will be presented data records in a grid. How can I offer a look up procedure for a specific column, For example one column contains customer numbers which the user can change but he needs a look up procedure to see a list of valid numbers. Any Ideas?
You could capture a right or left click on the column heading and give a drop down menu of options

[Migrated content. Thread originally posted on 05 June 2009]

I am developing a program where the user will be presented data records in a grid. How can I offer a look up procedure for a specific column, For example one column contains customer numbers which the user can change but he needs a look up procedure to see a list of valid numbers. Any Ideas?
You could capture a right or left click on the column heading and give a drop down menu of options

[Migrated content. Thread originally posted on 05 June 2009]

I am developing a program where the user will be presented data records in a grid. How can I offer a look up procedure for a specific column, For example one column contains customer numbers which the user can change but he needs a look up procedure to see a list of valid numbers. Any Ideas?
So the push button exists outside of the grid? Any examples of code would be appreciated

[Migrated content. Thread originally posted on 05 June 2009]

I am developing a program where the user will be presented data records in a grid. How can I offer a look up procedure for a specific column, For example one column contains customer numbers which the user can change but he needs a look up procedure to see a list of valid numbers. Any Ideas?
So the push button exists outside of the grid? Any examples of code would be appreciated

[Migrated content. Thread originally posted on 05 June 2009]

I am developing a program where the user will be presented data records in a grid. How can I offer a look up procedure for a specific column, For example one column contains customer numbers which the user can change but he needs a look up procedure to see a list of valid numbers. Any Ideas?
So the push button exists outside of the grid? Any examples of code would be appreciated

[Migrated content. Thread originally posted on 05 June 2009]

I am developing a program where the user will be presented data records in a grid. How can I offer a look up procedure for a specific column, For example one column contains customer numbers which the user can change but he needs a look up procedure to see a list of valid numbers. Any Ideas?
Yeah, button is outside of the grid.
See screen shot - we use the binoculars for our lookups.


       Screen1a-Gd-1-Ex-Other.
           MOVE KEY-STATUS TO WS-FUNC-KEY
      *CAPTURE BEGIN-ENTRY TERMINATION OF ACCEPT WHEN ONLY ENTER HAS BEEN PRESSED
           IF  Event-Type = MSG-BEGIN-ENTRY
           AND Event-Control-ID = 23
               EVALUATE WS-X
                 WHEN 1
                    PERFORM FINISH-COLUMN1-CODE
                    EXIT PARAGRAPH
                 WHEN 5
                    PERFORM FINISH-COLUMN5-CODE
                    EXIT PARAGRAPH
                 WHEN 6
                    PERFORM FINISH-COLUMN6-CODE
                    EXIT PARAGRAPH
                 WHEN 9
                    PERFORM FINISH-COLUMN9-CODE
                    EXIT PARAGRAPH
               END-EVALUATE
           END-IF
      *
      *CAPTURE FINISH-ENTRY TERMINATION OF ACCEPT
           IF  Event-Type = MSG-FINISH-ENTRY
           AND Event-Control-ID = 23
               EVALUATE WS-X
                 WHEN 1
                    PERFORM FINISH-COLUMN1-CODE
                    EXIT PARAGRAPH
                 WHEN 5
                    PERFORM FINISH-COLUMN5-CODE
                    EXIT PARAGRAPH
                 WHEN 6
                    PERFORM FINISH-COLUMN6-CODE
                    EXIT PARAGRAPH
                 WHEN 9
                    PERFORM FINISH-COLUMN9-CODE
                    EXIT PARAGRAPH
               END-EVALUATE
           END-IF
      *
           IF KEY-STATUS = 27
              MOVE ZEROS TO WS-FUNC-KEY
                            KEY-STATUS
           END-IF
           EVALUATE WS-FUNC-KEY
              WHEN 8
                 IF CONTROL-ID = 23
                    EVALUATE WS-X
                       WHEN 1
                          MODIFY  SCREEN1A-GD-1, Y = WS-Y, X = 1
                          INQUIRE SCREEN1A-GD-1,
                                RECORD-DATA IN S-ORL-LINES(IND2)
                                            HIDDEN-DATA IN ORL-KEY
                          IF S-ORL-BAR(IND2) = SPACES
                             MOVE SPACES TO LINKAGE-SEL-ISM-KEY
                             PERFORM CALL-INSISM
                             IF LINKAGE-SEL-ISM-KEY NOT = SPACES
                                MODIFY SCREEN1A-GD-1, Y = WS-Y, X = 1
                                            CELL-DATA S-ORL-BAR(IND2)   
      *                         PERFORM SCREEN1A-GD-1-EV-MSG-FINISH-ENTRY
                                PERFORM FINISH-COLUMN1-CODE
                             END-IF
                          END-IF
                    END-EVALUATE
                 END-IF




I've copied the main bit of code.
The function key presses have different tasks depending on where the user presses.
i.e column 1 is the product lookup, but on column 6 it'll mean something else.