Class Attributes

Class Attributes

Class Attributes are essentially of the data fields that would consist of the fields that will be filled in with data.

We will use the example of a Purchase Order Class to explain how the class attributes and the settings that one would need to be familiar with.

Class Attributes Overview

Shown below are the list of attributes for the Purchase Order class.

Class Attribute Settings

When a new attribute is to be added, the following are the important things to be kept in mind.

  1. The preferred name of the attribute is CamelCase format (NameOfTheAttribute) and no special characters are allowed. Some rules on Attribute name include the following
    1. Attribute name can be up to 32 characters long
    2. Cannot have spaces
    3. Cannot have special characters
    4. Cannot start with digits
  2. The allowed Attribute formats include String, Integer, Float, Date and blob
  3. For String characters you can set the Width
  4. You can set the attribute to be required by selecting the type to the “rp”
  5. You can the display to be in the form of text, list, multilist, etc. depending on the data.

Attribute Specific Settings

Once you have an attribute created, you can change it’s settings by selecting it and then add SQL queries or js functions which can collate data from another class object an fill in the data fields.

 

You can use the “Add property” to add SQL queries or js functions that can fetch data from another class object and fill the data fields automatically.

 

Attribute Format and Combinations

Format

Type

Display

Dispwidth

String

p,rp

Text, area, list, multilist, password, url

Integer

p,rp

Text, area, list, multilist

Float

p,rp

Text, area, list, multilist

Date

p,rp

Text, area, list, multilist,url

Blob

p,rp

 

Attribute Properties

name

The name simply defines the name of the attribute. This can only be set at initial creation stage and cannot be edited later on. Also remember to use CamelCase format when creating names.

 

Format

The format can be used to set the content format of the attribute fields. The options are shown as follows.

 

 

display

The display option is used to set the display format for the attribute data. The options available are as shown below

 

Width

The width option can be used to set the field length limit of the attribute data field. This defaults at 32 but can be changed later on as well.

 

Read

Write
Update

 

Query

The query function returns the attribute in the form of a query sql search so data from one attribute can be mapped to another attribute in a different class object.

 

Listtype

The listtype is usually left at its default of “p”. This means that the attribute can be left blank and the process progression is possible. To have the attribute can be set to “rp” in case the field is to be mandatory. The process will progress only when the field is filled in that case.

 

dispwidth

This is used to set the max. visible char value for the attribute data field. This is usually set to null since we don’t want any of the values shown to be inconsistent or incomplete.

 

Select

Select can be used to select and map another Form’s data to be displayed in the Alternate class object. Here below, data from the Supplier Catalog Item form has been mapped to be displayed under the PR Item form.

 

 

selectcrit

Selectcrit is used to define the criteria on which data formats will be allowed to be mapped in from another form to be displayed in the Alternate Form. The below example shows one such criteria.

 

multilist

Multilist is used to set the ability to have multiple selections in a list of data for the Attribute data fields. When multilist is selected as the display parameter, multiple selections for values can be made for the data in the attribute field.

 

 

sourceattr

Sourceattr is used to map the exact attribute data field that is to be mapped in from another form and displayed onto another alternate form. In the below example, we have the SupplierPartNumber Attribute data from another Form being mapped to be displayed under Item in Purchase Requisition Form.

units

 

help

 

min

 

max

 

admin_update

 

 

 

List Attribute Properties

display – list, multilist

listsource – query,program,class

listtype – derived,actual,config

command –

 

Examples

Drop-down value selected is TransportationGroup from table  TTGRT. Description from table TTGRT is displayed on the screen

display – list

listsource – query

listtype – derived

command – select TransportationGroup,’::’,Description from TTGRT

 

Date Examples

default=TIME.Date” dispformat=“yyyy/MM/dd” display=“text” dispwidth=“10” format=“Date”

 

 

List Examples

command=“select Email,’::’,LastName,’ ‘,FirstName  from Usr where Role=’Assistant'” display=“list” listsource=“query” listtype=“derived”

 

command=“select Email,’::’,CONCAT(FirstName,’ ‘,LastName)  from Usr where Role = ‘Customer’ order by FirstName,LastName” multiselect=“Usr:EMail:FirstName,LastName:autocomplete” selcrit=“Role = ‘Customer'”

 

select Value,’::’,CONCAT(Value,’-‘,Description) from Family where Organization=’__Organization__’ order by Value asc

 

command=“select Email,’::’,LastName,’ ‘,FirstName  from Usr where Role=’Assistant'” display=“list” listsource=“query” listtype=“derived”

 

command=“Select CompanyCode from CompanyCode order by CompanyCode asc” display=“list” listsource=“query” listtype=“derived”

 

trans=“name:Collaboration”  listtype=“derived” listsource=“query” command=“select UID,’::’,CID from Collaboration where UID = ‘__CollabID__‘ order by CollID” copy=“-“ view=“Collaboration:UID” val=‘::None’/>

 

Multilist Examples

display=“multilist” admin_update=“+” dispwidth=“5” listtype=“derived” listsource=“com.*.*.*” command=“get*********”/>

 

 

Select Examples

 

 

Multiselect Examples

command="select Email,'::',CONCAT(FirstName,' ',LastName) from Usr where Role = 'Customer' order by FirstName,LastName" display="text" multiselect="Usr:EMail:FirstName,LastName:autocomplete" selcrit="Role = 'Customer'"

 

 

Float Examples

 

 

 

Integer Examples

 

 

String Examples