Inheritance Setting
Inheritance Settings enable you to configure field mapping between a Source and a Destination form. When a destination record is created from a source record, the data in the mapped fields is automatically copied from the source to the destination.
Creating an Inheritance Setting
You can create an Inheritance Setting either from the Administration Center application or through a specific Form Setting > Inheritance Setting tab.
Creating an Inheritance Setting through the Administration Center application
- Log in to ETQ Reliance with an Administrator user account.
- Go to the All Applications page and open the Administration Center application.
- Open the New Document menu and select Inheritance Setting.
- Fill in the Display Name field.
- Select the Source Application. This will list the forms of the selected application in the Source Form field.
- Select the Source Form (i.e., the form from where information will be inherited into a destination form). If you want to map data from the subform fields of the source form, select the Map Subform Fields option under the Source Form field and select the Source Subform from the list of the subforms available in the selected source form.
- Select the Destination Application. This will list the forms of the selected application in the Destination Form field.
- Select the Destination Form. If you want to map data to the subform fields of the destination form, select the Map Subform Fields option under the Destination Form field and select the Destination Subform from the list of the subforms available in the selected destination form.
- Follow the steps in the following sections to configure subform mapping and field mapping.
- Click Apply & Close.
Creating an Inheritance Setting through a specific Form Setting
- Log in to ETQ Reliance with a Designer user account.
- Hover over the related application's application card.
- Click on the Designer action to open the application with the intended destination form in designer mode.
- Open the Form Builder of the destination form and click on Open Form Setting.
- Go to the Inheritance tab and add a new record to the Inheritance Settings subform. You must add a separate record for each source form from which data will be inherited into this destination form.
- Select the Source Form from the list of all Reliance forms. If Inheritance Settings are available with this form as a Destination and the Source Form you selected as a Source Form, they will appear as options in the Inheritance Setting(s) field.
- Select an existing inheritance setting from the Inheritance Setting(s) field or create a new one by clicking the Create Inheritance Setting action. If you choose to create a new Inheritance Setting, follow the steps below:
Confirm the setting creation so the system can create and open a new Inheritance Setting in a new tab with the Source Application, Destination Application, Source Form, and Destination Form fields filled in.
If you want to map data from the subform fields of the source form, select the Map Subform Fields option under the Source Form field and select the Source Subform from the list of the subforms available in the selected source form.
If you want to map data to the subform fields of the destination form, select the Map Subform Fields option under the Destination Form field and select the Destination Subform from the list of the subforms available in the selected destination form.
Fill in the Display Name.
Follow the sections below to configure the field mapping.
Apply & Close the Inheritance setting. A link to the newly created Inheritance Setting form will be displayed in the Inheritance Link(s) field of the Inheritance Settings subform.
- Apply & Close the Form Setting.
Configuring the Field Mapping
Follow the steps below for each field data mapping:
- Add a new record to the Mapping Details subform.
- Select one of the available Source Options (Field or EtQScript).
- Select the Source Field or write a Source Formula (EtQScript). This will dictate the source of the data to be mapped.
- Select the Destination Field.
Disable Inheritance Setting
To disable/enable defined field mappings between the source and destination fields, select the Disabled checkbox at the top of the Inheritance Setting.
Accessing the Inheritance Setting
You can access all Inheritance Settings through the following views, regardless of where they were created.
Inheritance Setting View – Administration Center application
The 26. Inheritance Settings view of the Administration Center application with the following categories and columns:
By Last Date Modified: Design Name, Display Name, Date Modified, Source Application, Destination Application, Source Form, Destination Form, and Disabled.
By Name: Design Name, Display Name, Date Modified, Source Application, Destination Application, Source Form, Destination Form, and Disabled.
Inheritance Setting View – Reliance Engine application
The Inheritance Setting view of the Reliance Engine application with the following categories and columns:
By Last Date Modified: Design Name, Display Name, Date Modified, Source Application, Destination Application, Source Form, Destination Form, and Disabled.
By Name: Design Name, Display Name, Date Modified, Source Application, Destination Application, Source Form, Destination Form, and Disabled.
Use cases when using ETQScript as a Source Type
Case 1: Skipping the field inheritance conditionally
If you have configured field mapping, you may want to skip the field mapping in certain conditions. You can write an EtQScript to specify such conditions.
This EtQScript activates the inheritance profile when the type of the Course Profile is "Normal" only:
courseProfile = thisDocument.getParentDocument()
if courseProfile != None:
courseTypeVal = courseProfile.getFieldValue("TRAINING_COURSE_TYPE")
if courseTypeVal == 1:
print false
else:
print true
Case 2: Calculating a default expiration date of a course schedule
The following EtQScript is used to calculate the default Expiration Date of the Course Schedule based on the entries in the related Course Profile when the Course Schedule is created from the Course Profile. In this example, the Course Profile is the Source Form, and the Course Schedule is the Destination one.
expDate = Rdate.now()
yearsAdded = thisDocument.getFieldValue("TRAINING_EXPIRES_YEARS")
monthsAdded = thisDocument.getFieldValue("TRAINING_EXPIRES_MONTHS")
daysAdded = thisDocument.getFieldValue("TRAINING_EXPIRES_DAYS")
totalDays = 0
if yearsAdded != None:
totalDays += yearsAdded * 365
if monthsAdded != None:
totalDays += monthsAdded * 30
if daysAdded != None:
totalDays += daysAdded
print Rdate.getDateOnly(Rdate.addDays(expDate, totalDays), Rdate.MEDIUM)
|
|
|