Step 5 Add a Virtual Field to Your File

Visual LANSA

Step 5. Add a Virtual Field to Your File

REP011 - Repository Summary

In this step create a field Holiday Duration iiiHolDuration which will be used as a virtual field in the Holiday file.

Field Name

Field Description

Type

Length

Virtual

iiiHolDuration

Holiday Duration (virtual field)

Alpha

40

Yes

 

1.  Create the virtual field derivation in your file. It will show the holiday dates like this:

2.  Make it a Code Fragment derivation. It needs to be derived when the record is read.

     Copy this code from the online guide Tutorials to create the field derivation:

#iiiHolDuration := #iiiHolStartDate.AsDisplayString( DDXXbMMMMMMMMMbCCYY ) + '  -  ' + #iiiHolEndDate.AsDisplayString( DDXXbMMMMMMMMMbCCYY )
 

     Note: Changing your font to a small size such as 8pt (see Options / Font) will make editing the above code much easier.