Develop > Document Engine Guide > Work order example overview > Create alias in probsummary table for link

Create an alias in probsummary table for link

In the work order example, users need to be able to access a work order from an incident record when the incident has a work order associated with it. In order to do this, you must create an alias in the probsummary table and then use that alias to create a link between the probsummary table and the EXWorkOrder table.

To add an alias to the probsummary table, follow these steps:

  1. From the System Navigator, click Tailoring > Database Dictionary to open the Database Dictionary form.
  2. Type probsummary in the File Name field.
  3. Click Search.
  4. On the Fields tab, select the number field and click Edit Field/Key.
  5. Click Create Alias and type number.WO.vj for name and character for type.
  6. Click OK.

To link the EXWorkOrder table with the probsummary table, follow these steps:

  1. From the System Navigator, click Tailoring > Tailoring Tools > Links to open the Link File form.
  2. Type probsummary in the Name field.
  3. Click Search.
  4. Click after the last entry to create a blank line for a new entry.
  5. In the Source field, type number.WO.vj.
  6. Select the entire new line and then click Select Line.
  7. Enter the following information:

    Field Value
    Field (From/Source) number.WO.vj
    File (To/Target) EXWorkOrder
    Field (To/Target) RelatedID
    Query $query
    Expressions $query="RelatedID=\""+number in $File+"\""
  8. Click Save and then Back.
  9. Repeat steps to create a link line for the ID field.
  10. Enter the following information.

    Field Value
    Field (From/Source) ID
    File (To/Target) EXWorkOrder
    Field (To/Target) ID
    Query $query
    Expression $query="ID=\""+nullsub(cursor.field.contents(), "xxx")+"\""
  11. Click Save and then Back.