Rows Entries

Visual LANSA

Rows (Entries)

To define the First Name entry in the property sheet:

1.  In the Initialize event of your property sheet specify a description and a value for the entry (remember the first column is based on the field  #PROPERTY and the second column on the field #VALUE):

 

CHANGE field(#PROPERTY) to('''First Name''')
CHANGE field(#VALUE) to(#GIVENAME)

 

2.  Add the entry to the property sheet:

 

ADD_ENTRY to_list(#PROP_1)
 

3.  Define a Data Class for the entry (in the beginning of your component):

 

DEFINE_COM class(#GIVENAME) name(#GIVENAME)
 

4.  In the Initialize event routine assign the data class to the entry. The data class will handle the way the value is displayed and entered:

 

SET com(#prop_1.CurrentItem) DATACLASS(#givename)

 

This statement tells the property sheet that the value for this entry in the second column in the property sheet should be shown (and edited) according to the class #GiveName. For example, it cannot be more than 20 characters long and it can contain upper or lowercase characters.

You repeat these four basic steps for every entry in the property sheet. For example this is how you would define the Salary entry in the property sheet:

1.

In the Initialize event of your property sheet specify a description and a value for the entry:

 

CHANGE field(#PROPERTY) to('''Salary''')

CHANGE field(#VALUE) to('#SALARY.TEXT')

Note that because #SALARY is a numeric field but you are displaying it in a column based on an alphanumeric field (#VALUE), you need to display its TEXT property.

 

2.

Add the entry to the property sheet:

 

ADD_ENTRY to_list(#PROP_1)

 

3.

Define a Data Class for the entry:

 

DEFINE_COM class(#SALARY) name(#SALARY)

 

4.

In the Initiallize event routine assign the data class to the entry:

 

SET com(#prop_1.CurrentItem) DATACLASS(#salary)

 

This statement tells the property sheet that the value for this entry in the  second column in the property sheet should be shown (and edited) according to the class #SALARY. For example, it's maximum length is  11 digits and it can contain 2 decimals and its default value is 0.

 

Ý 6.26.1 Basics