IDO Data Rules and IDO Cached Settings sample scenarios
AccessAs setting.
In your environment, a different value can be used for the AccessAs setting.
Open the AccessAs form and see what the AccessAs setting is for your environment. For example, if in a cloud environment it likely will be ue_ as the AccessAs value.
Throughout the exercises, you will see a Caution note mentioning where you are required to add your AccessAs prefix as a part of an object name - form, ido, constraint, data elements, etc., while working through the exercises.
Setup
For all of the scenarios involved in this chapter we are going to use two IDOs and two forms that are required to be created.
Step 1: Creating the SQL Tables
- DRExampleDepts_mst
- DRExampleUserTasks_mst
Creating the DRExampleDepts_mst SQL table
- Open the SQL Tables form and add these details and columns:
- Table Name: DRExampleDepts_mst
- Schema: dbo
Caution: If you are in cloud, your table name should have the ue_ as prefix.
- MultiSite: checked
- Save the table.
- Paste these in the metadata for the columns:
dept dbo DRExampleDepts_mst nvarchar nvarchar 40 NO 0 0 9 description dbo DRExampleDepts_mst nvarchar nvarchar 60 YES 0 0 10The pasted code should look be similar to the image below.
- Click OK.
- Click Save.
Creating the DRExampleDepts_mst SQL table
- Open the SQL Tables form and specify these details and columns:
- Table Name: DRExampleUserTasks_mst
- Schema: dbo
Caution: If you are in cloud, your table name should have the ue_ as prefix.
- MultiSite: checked
- Save the table.
- Click the Columns button and add the two required columns by selecting .
- Paste these in the metadata for the columns:
Username dbo DRExampleUserTasks_mst UsernameType nvarchar 128 YES 0 0 2 TaskType dbo DRExampleUserTasks_mst nvarchar nvarchar 40 NO 0 0 3 StartDate dbo DRExampleUserTasks_mst DateTimeType datetime YES 0 0 4 EndDate dbo DRExampleUserTasks_mst DateTimeType datetime YES 0 0 5 Status dbo DRExampleUserTasks_mst nvarchar nvarchar 20 NO 0 0 6 TaskDesc dbo DRExampleUserTasks_mst DescriptionType nvarchar 40 YES 0 0 14 Seq dbo DRExampleUserTasks_mst int int NO 1 1 0 15 dept dbo DRExampleUserTasks_mst nchar nchar 40 NO 0 0 16The pasted code should be similar to the image below.
- Click New Constraint to add a
Primary Keyfor theSeq. - Specify these information:
- Constraint Type: select Primary Key.
Caution: If you are in cloud, your table name should have the ue_ as prefix.
- Constraint: specify PK_DRExampleUserTask_mst.
- Clustered Index: select this option.
- Constraint Type: select Primary Key.
- Select the
Seqcolumn and click Add. - Click Finish.
Creating the DRExampleUserReqs_mst SQL table
- Open the SQL Tables form and specify these details and columns:
- Table Name: DRExampleUserReqs_mst
- Schema: dbo
Caution: If you are in cloud, your table name should have the ue_ as prefix.
- MultiSite: checked
- Save the table.
- Click the Columns button and add the two required columns by selecting .
- Paste these in the metadata for the columns:
ReqNum dbo DRExampleUserReqs_mst int int NO 1 1 0 9 ReqDate dbo DRExampleUserReqs_mst DateType datetime NO 0 0 10 Item dbo DRExampleUserReqs_mst nvarchar nvarchar YES 0 0 11 UnitCost dbo DRExampleUserReqs_mst decimal decimal NO 0 0 12 Qty dbo DRExampleUserReqs_mst decimal decimal NO 0 0 13 ExtCost dbo DRExampleUserReqs_mst decimal decimal NO 0 0 14 Dept dbo DRExampleUserReqs_mst nvarchar nvarchar NO 0 0 15 Description dbo DRExampleUserReqs_mst nvarchar nvarchar YES 0 0 16 Approved dbo DRExampleUserReqs_mst tinyint tinyint NO 0 0 17 AppDate dbo DRExampleUserReqs_mst DateType datetime YES 0 0 18 AppUsername dbo DRExampleUserReqs_mst UsernameType nvarchar YES 0 0 19
The pasted code should be similar to the image below.
- Click New Constraint to add a
Primary Keyfor theSeq. - Specify these information:
- Constraint Type: select Primary Key.
Caution: If you are in cloud, your table name should have the ue_ as prefix.
- Constraint: specify PK_DRExampleUserReqs_mst.
- Clustered Index: select this option.
- Constraint Type: select Primary Key.
- Select the
ReqNumcolumn and click Add. - Click Finish.
Creating the DRExampleParms_mst SQL table
- Open the SQL Tables form and specify these details and columns:
- Table Name: DRExampleReqParms_mst
- Schema: dbo
Caution: If you are in cloud, your table name should have the ue_ as prefix.
- MultiSite: checked
- Save the table.
- Click the Columns button and add the two required columns by selecting .
- Paste these in the metadata for the columns:
MgtReqLimit dbo DRExampleReqParms_mst decimal decimal 19 2 (0) NO 0 0 11 ExecReqLimit dbo DRExampleReqParms_mst decimal decimal 19 2 (0) NO 0 0 12 VendorControlledMaintMatls dbo DRExampleReqParms_mst tinyint tinyint (0) NO 0 0 13
The pasted code should be similar to the image below.
- Click OK.
- Click Save.
Step 2: Creating Triggers
ue_ as prefix on them when working through the Create Triggers section.
- Open the Trigger Management form.
- Select the Regenerate Specific Triggers option.
- Specify DRExampleDepts_mst in the Starting Table field.
- Specify DRExampleUserTasks_mst in the Ending Table field.
- Click Generate.
Note: These should show that four (4) tables have been processed.
Step 3: Creating Views for the tables
ue_ as prefix on them when working through the Create Views section.
- Open the Application Schema Tables Metadata form.
- Filter on
DREx*and press F4.- For the
DRExampleDepts_msttable, specify DRExampleDepts for the View Name and click Save. - For the
DRExampleReqParms_msttable, specify DRExampleReqParms for the View Name and click Save. - For the
DRExampleUserTasks_msttable, specify DRExampleUserTasks for the View Name and click Save.
- For the
- Open the View Management form.
- Select the Regenerate Specific Views option.
- Select
DRExampleDepts_mstin the Start table field. - Select
DRExampleUserTasks_mstin the Ending table field. - Click Generate.
Note: A message prompt is shown that four (4) views were processed.
- Click OK.
Step 4: Creating the IDO project
- Open the IDO Projects form.
- Create a new IDO.
- Specify these information:
- Project Name
- Specify DRExample
- Description
- Specify IDO project for data rules examples.
- Access
- Use the default or use the value NULL.
- Save the IDO project.
Step 5: Creating the IDOs
From the IDO Projects form on the DRExample project, click the New IDO button.
Creating the DRExampleDepts IDO
- In the New IDO form, specify these information:
- Project Name
-
Select
DRExample. - Primary Base Table
-
Use the
ViewNameDRExamplesDepts. - IDO Name
- Specify DRExampleDepts.
- Table Alias
- Specify dredep
- Click Next.
- Click Finish.
- Click the Properties button.
- Locate the
DeptandDescriptionproperties - Specify sDept for the Label String ID on the
deptproperty. - Click Save.
- Specify sDescription for the Label String ID on the
Descriptionproperty. - Click Save.
Creating the DRExampleUserTasks IDO
- Click the New ID button.
- In the New IDO form, specify these information:
- Project Name
-
Select
DRExample. - Primary Base Table
-
Use the
ViewNameDRExampleUserTasks. - IDO Name
- Specify DRExampleUserTasks.
- Table Alias
- Specify drexut
- Click Next.
- Click Finish.
- Click the Properties button.
- Locate the
Deptand ensure that it is NOT Read Only in the bottom center. - Click the New Property button.
- In the IDO Property Wizard, select the Unbound option.
- Click Next.
- Specify the Body in the Property Name.
- Click Finish.
- In the Data pane, specify these information:
- Data Type
- Specify String as a data type.
- Length
- Specify the length of 4000.
- In the Formatting pane, specify these information:
- Label String ID
-
Specify sBody as the label string for the
Bodyproperty. - Read Only
- Select this option.
- Click Save.
- Repeat the steps to add the
Subjectproperty and specify these information:- Property Name
-
Specify
Subjectas the property name.
- Data Type
- Specify String as a data type.
- Length
- Specify the length of 400.
- Label String ID
-
Specify sSubject as the label string for the
Subjectproperty. - Read Only
- Select this option.
- Repeat the steps to add the
ToEmailAddressproperty and specify these information:- Property Name
-
Specify
ToEmailAddressas the property name.
- Data Type
- Specify String as a data type.
- Length
- Specify the length of 128.
- Label String ID
-
Specify sDRExampleToEmailAddress as the label string for the
ToEmailAddressproperty. - Read Only
- Select this option.
- Select and update the Label String ID for these properties:
Property Label String ID UsernameSpecify sUsername.
TaskTypeSpecify sDRExampleTaskType.
Select both Required and Read Only option.
StartDateSpecify sStartDate.
Select the Read Only option.
EndDateSpecify sEndDate.
Select the Read Only option.
StatusSpecify sDRExampleStatus.
Select both Required and Read Only option.
TaskDescSpecify sDRExampleTaskDesc.
Select the Read Only option.
SeqSpecify sSeq.
deptSpecify sDRExampleDept.
Clear the Read Only option, if selected.
- Save all of the IDO Properties.
Creating the DRExampleUserReqs IDO
- In the New IDO form, specify these information:
- Project Name
-
Select
DRExample. - Primary Base Table
-
Use the
ViewNameDRExampleUserReqs. - IDO Name
- Specify DRExampleUserReqs.
- Table Alias
- Specify drexur
- Click Next.
- Click Finish.
- Click the Properties button.
- Locate the
Deptand ensure that it is NOT Read Only in the bottom center. - Update these properties:
Property Fields and Values ReqNumLabel String ID: sDRExampleReqNum ReqDateLabel String ID: sDRExampleReqDate Default Value:
CURDATE()ItemLabel String ID: sDRExampleItem Select the Read Only option.
UnitCostLabel String ID: sDRExampleUnitCost. Justify: Right
Display Decimal Position: 2
Select the Read Only option.
QtyLabel String ID: sDRExampleOty Justify: Right
Display Decimal Position: 2
Select the Read Only option.
ExtCostLabel String ID: sDRExampleExtCost. Data Type: Decimal
Length: 22
Position: 8
Justify: Right
Display Decimal Position: 2
Select the Read Only option.
DeptLabel String Property: sDRExampleDept ApprovedLabel String ID: sDRExampleApproved Select the Read Only option.
Ensure that the Required option is not selected.
AppDateLabel String ID: sDRExampleAppDate Select the Read Only option.
Ensure that the Required option is not selected.
AppUsernameLabel String ID: sDRExampleAppUsername Select the Read Only option.
Ensure that the Required option is not selected.
- Save all of the IDO properties.
Creating the DRExampleReqParms IDO
- In the New IDO form, specify these information:
- Project Name
-
Select
DRExample. - Primary Base Table
-
Use the
ViewNameDRExampleReqParms. - IDO Name
- Specify DRExampleReqParms.
- Table Alias
- Specify drerp
- Click Next.
- Click Finish.
- Click the Properties button.
- Locate the
MgtReqLimitandExecReqLimitproperties - Update these properties:
Property Field and Value MgtReqLimitLabel String ID: sDRExampleMgtReqLimit Justify: Right
ExecReqLimitLabel String ID: sDRExampleExecReqLimit Justify: Right
VendorControlledMainMatlsLabel String ID: sDREaxmpleVendCntrlMaintMtls - Save all of the IDO Properties.
Step 6: Check in the IDOs
On the IDOs form for the new IDOs, click the Check In button and click OK to get past the message about the Source Integration not being enabled.
Step 7: Creating the Extension Class Assembly for IDO: DRExampleUserTasks
Step 8: Creating the Extension Class Assembly for IDO: DRExampleUserReqs
Step 9: Import the forms and strings metadata
See Appendix C: Forms Metadata for instructions on importing the forms and strings metadata necessary for the Data Rules example scenarios.
Step 10: Clearing the IDO and Forms Cache
- Navigate to .
- Ensure that the Unload IDO Metadata with Forms option is selected.
- Navigate to .
- Click Unload Global Form Objects.
Step 11: Creating the data for the sample scenarios
Creating the department data
- Open the DRExampleDepts form.
- Add five (5) departments based on these data:
100 Manufacturing 200 Accounting 300 Maintenance 400 Engineering 500 Executive 600 IT - Click OK.
- Click Save.
Creating the group data
- Open the Groups form.
- Navigate to .
- Paste this data:
DREX_Acct Data Rules Accounting Group 0 DREX_Eng Data Rules Engineering Group 0 DREX_Exec Data Rules Executive Group 0 DREX_Exec_ReqAppr Data Rules Exec Req 0 DREX_Mfg Data Rules Manufacturing Group 0 DREX_Mnt Data Rules Maintenance Group 0 DREX_IT Data Rules Information Technology 0 DREX_IT_ReqAppr Data Rules IT Req Appr 0 - Click OK.
- Click Save.
Creating and assigning users to Groups
- Use the Users form to add these users.
User Name Details ITUser Super User: No User Description: IT Dept. User
User Password: DataRules1Note: You are required to enter your password for a second time after specifying the Editing Permissions field.Editing Permissions: Site Developer
Open the User Modules form and select Transactional in the Module Name field.
Click new and add a second module and select Developer.
ITMgr Super User: No User Description: IT Dept. Mgr
User Password: DataRules1Note: You are required to enter your password for a second time after specifying the Editing Permissions field.Editing Permissions: Site Developer
Open the User Modules form and select Transactional in the Module Name field.
Click new and add a second module and select Developer.
MntMgr Super User: No User Description: Maintenance Mgr
User Password: DataRules1Note: You are required to enter your password for a second time after specifying the Editing Permissions field.Editing Permissions: Site Developer
Open the User Modules form and select Transactional in the Module Name field.
ExecUser Super User: No User Description: Executive User
User Password: DataRules1Note: You are required to enter your password for a second time after specifying the Editing Permissions field.Editing Permissions: Site Developer
Open the User Modules form and select Transactional in the Module Name field.
- Open the Groups form to assign users to groups.
- Use this filter DREX* and press F4 to show all groups with DREX in their name.
- Assign the users to these groups:
Group User Name DREX_ExecExecUserDREX_Exec_ReqApprExecUserDREX_ITITUserandITMgrDREX_IT_ReqApprITMgrDREX_MntMntMgr - Provide access to the forms, select a group and click the Group Authorizations button.
- For the
DREX_IT,DREX_IT_ReqqApp, andDREX_Mntgroups, select the Form as Object Type. - Add these groups:
Group Permission/Privilege DRExampleUserReqsGranted for all permissions. DRExampleUserTasksGranted for all permissions. DRExampleDeptsGranted for all permissions. DRExampleReqParmsGranted for Read and Execute privilege. - For the
DREX_Execgroup, select the Form as Object Type. - Add these groups:
Group Permission/Privilege DRExampleUserReqsGranted for all permissions. DRExampleUserTasksGranted for all permissions. DRExampleDeptsGranted for all permissions. DRExampleReqParmsGranted for all permissions. - Populate the
sample req limitsfor managers or executives and a flag that will be used in a later exercise with Cached Settings.Note: If in a cloud environment, your form and IDOs may differ having aue_prefix. - Open the DRExampleReqParms form.
- Create a new record:
- Specify a $20000 value in the ExecReqLimit.
- Specify a $1500 value in the MgtReqLimit.
- Select the Vendor Controlled Main. Mtls. checkbox.
- Save the form.