EGL Reference Guide for iSeries

Syntax for overriding item properties in a record

In a record or record-part declaration, you can override the properties of record items. The syntax is in the following format, with each level of information nested within the previous level:

    item name1 { item name2 { properties for the nested item } } 

Properties may be nested as deeply as the structure of the record is nested, and the names of intermediate levels must be supplied either by qualification or by additional nesting.

The following example shows a basic record part for use in a page handler:

  Record myRecordPart01 type basicRecord
	10 item1;
	  15 item2;
	    20 item3 char(4) {displayUse = button, action = "label1"};
	10 item4;
	  15 item5;
      20 item6 char(4) {displayUse = button, action = "label2"};
  end

Alternatively, that record part can be defined as follows:

  Record myRecordPart01 type basicRecord
 
  // nesting properties by multiple levels of nesting
  { item1 { item2 { item3 
    {displayUse = button, action = "label1"}}}, 
 
  // nesting properties by qualifying the item names
    item4.item5.item6 {displayUse = button, action = "label2"} 
  }
 
  10 item1;
	  15 item2;
	    20 item3 char(4);
  10 item4;
	  15 item5;
	    20 item6 char(4);
  end

Finally, the next example shows a variable declaration where the properties for item3 and item6 are overridden:

  myRecord myRecordPart01 
 
  // nesting properties by multiple levels of nesting
  { item1 { item2 {item3 { action = "label3"}}},
 
  // nesting properties by qualifying the item names
  item4.item5.item6  { action = "label6"} } 


Related concepts
PageHandler part
Page Designer support for EGL
Typedef


Related reference
Arrays
Field-presentation properties
Formatting properties
Form part in EGL source format
Data initialization
Page item properties
SQL item properties
Validation properties


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]