7.1 Adding the Component Reference Part

Now you are ready to add a Component Reference part to the Customer Inquiry window.

Follow these steps:

  1. Open the GUI Designer for the Customer Inquiry project and open the Customer Inquiry window CUSTINQ.
  2. Locate the Component Reference part and add it to the Customer Inquiry window
  3. Double-click on the Component Reference part on the Customer Inquiry window and make the following changes:
  4. Click on the OK push button to save and close the notebook.

Next you write an action subroutine which will be invoked when the Component Reference part MONCHG gets notified by a CHANGE Event from the Entry field EF2. When the Entry field change event occurs, the Component Reference part will signal a Notify Event.

Follow these steps:

  1. Write an action subroutine for the MONCHG Notify event that retrieves the ATTRVALUE from the MONCHG part and puts it into the variable CUSTNO.
  2. 
    *...1....+....2....+....3....+....4....+....5....+....6....+....7....+.
    CSRN01Factor1+++++++Opcode(E)+Factor2+++++++Result++++++++Len++D+HiLoEq
    C     'MONCHG'      Getatr    'AttrValue'   CustNo
    
  3. Copy this value to the CUSTNO field in the Customer Inquiry window with the SETATR statement:
  4. 
    CSRN01Factor1+++++++Opcode(E)+Factor2+++++++Result++++++++Len++D+HiLoEq
    C     'CustNo'      Setatr    CustNo        'Text'
    

Remember to save your source in the Editor.

Click on to indicate that you've done all the steps.