Every so often during the interviews, we encounter this question a lot and without a proper understanding we end up improvising the explanation.
The question is - What do you know about dynamic prompts and how we can create them ?
Well, Lets get to the point and try understanding the concept with examples.
Prompts enable user to select a value from the list of predefined control values for a field in a page during transactions.
For Example, when we create a new department, to select the company we click on the prompt for company field and select one of the listed values.
In this case, the list of companies displayed in the prompt is static and is directly pulled from the record COMPANY_TBL.
Below is the record field properties of COMPANY field in the record DEPT_TBL,
In this case, there is no control over what are all the values will be prompted to the user, whatever is available in the record COMPANY_TBL, will be listed.
Please also see -
PeopleSoft Set Control Field Concept and Tableset Sharing
PeopleSoft 9.1 Person Model
Adding and Maintaining Person Of Interest in PeopleSoft
PeopleSoft Set Control Field
Peoplesoft Row Level Security Search Records
SQL Query for Max Effective (MAX (EFFDT) dated row from JOB table
How to Resolve a Row Level Security Issue in PeopleSoft
How to find the List of Users Assigned to a Role
Creating Query Report with PS Query in PeopleSoft
PeopleSoft HRMS Online Training
Dynamic prompts on the other hand, enable us to have control over how and what will be the prompt values. i.e, based on a particular field value we can build a prompt dynamically during run time.
Lets understand it more with two scenarios:
You see above, HR user is doing a transaction in the JOB_DATA component for an employee, NZ11SN19 who belongs to the company "107". So, in compensation page when HR user clicks the prompt button for "Rate Code" field, Only the compensation rate codes defined for company 107 should be available for selection.
This is called dynamic prompt, and it can be implemented using record type "Dynamic View" and is one way of implementing dynamic prompts.
Let's find out how to implement this-
Step 1: Create a record of type "Dynamic View" using app designer with the name - FMC_CRCCMP_DVW
End-If;
Business Unit, Company and Regulatory Region in PeopleSoft
Process Security in PeopleSoft
Following is the link to the YouTube videos Technical
Click here to see course contents
Click here to know how it works
However, if you want to save money by purchasing whole module instead of in parts then visit this page to get more details PeopleSoft Functional and technical online training
The question is - What do you know about dynamic prompts and how we can create them ?
Well, Lets get to the point and try understanding the concept with examples.
Prompts enable user to select a value from the list of predefined control values for a field in a page during transactions.
For Example, when we create a new department, to select the company we click on the prompt for company field and select one of the listed values.
In this case, the list of companies displayed in the prompt is static and is directly pulled from the record COMPANY_TBL.
Below is the record field properties of COMPANY field in the record DEPT_TBL,
In this case, there is no control over what are all the values will be prompted to the user, whatever is available in the record COMPANY_TBL, will be listed.
PeopleSoft Set Control Field Concept and Tableset Sharing
PeopleSoft 9.1 Person Model
Adding and Maintaining Person Of Interest in PeopleSoft
PeopleSoft Set Control Field
Peoplesoft Row Level Security Search Records
SQL Query for Max Effective (MAX (EFFDT) dated row from JOB table
How to Resolve a Row Level Security Issue in PeopleSoft
How to find the List of Users Assigned to a Role
Creating Query Report with PS Query in PeopleSoft
PeopleSoft HRMS Online Training
Dynamic prompts on the other hand, enable us to have control over how and what will be the prompt values. i.e, based on a particular field value we can build a prompt dynamically during run time.
Lets understand it more with two scenarios:
Scenario 1 (Dynamic Prompt using Dynamic View)
As per delivered PeopleSoft functionality, Compensation Rate Codes are created to be used by all the companies. Common set of Compensation Rate Codes result in a huge number of Compensation Rate Codes being rendered to a HR Users when they define a person’s compensation on their Job Data.
However business want us to customize delivered PeopleSoft pages that enable HR Users to access and view only Compensation Rate Codes which are applicable for person’s company.
You see above, HR user is doing a transaction in the JOB_DATA component for an employee, NZ11SN19 who belongs to the company "107". So, in compensation page when HR user clicks the prompt button for "Rate Code" field, Only the compensation rate codes defined for company 107 should be available for selection.
This is called dynamic prompt, and it can be implemented using record type "Dynamic View" and is one way of implementing dynamic prompts.
Let's find out how to implement this-
Step 1: Create a record of type "Dynamic View" using app designer with the name - FMC_CRCCMP_DVW
Make the fields, COMPANY & COMP_RATECD as both "Search key" and "List Box item" and all other fields as "List Box item" only.
Step 2: In the COMPENSATION record, open the record field property of COMP_RATECD, go to "Edits" tab and assign the newly created dynamic view FMC_CRCCMP_DVW as the prompt table edit.
Step :3 Add below peoplecode in the RowInit record field event of COMP_RATECD field
&Company = JOB.COMPANY.Value;
If %Component = "JOB_DATA" Or Then
&fmccrcdyvwsql = SQL string which fetches the compensation rate codes WHERE COMPANY = &Company (Current person's company)
COMPENSATION.COMP_RATECD.SqlText = &fmccrcdyvwsql;
&fmccrcdyvwsql = SQL string which fetches the compensation rate codes WHERE COMPANY = &Company (Current person's company)
COMPENSATION.COMP_RATECD.SqlText = &fmccrcdyvwsql;
Where &fmccrcdyvwsql is SQL string which will pull the compensation rate codes valid only for the current person's company.
Note - The above SQL is valid only when the below component is customize to define the Compensation rate codes based on the company:
Navigation - SetUP HRMS -> Foundation tables -> Compensation rules -> Comp rate code table
Please also see -
How the Various Date Fields on Employement Data Page are Updated
'Override Position Data' and 'Use Position Data' Option in Job Data Page
Adding and Maintaining Person Of Interest in PeopleSoft
Hiring a Person in PeopleSoft
How to Resolve a Row Level Security Issue in PeopleSoft
How to find the List of Users Assigned to a Role
SQL Query to find all the Direct Reports for a Manager
Simplified Way to Provide a Page Access in PeopleSoft
Understanding Component Interface in PeopleSoft
Note - The above SQL is valid only when the below component is customize to define the Compensation rate codes based on the company:
Navigation - SetUP HRMS -> Foundation tables -> Compensation rules -> Comp rate code table
Please also see -
How the Various Date Fields on Employement Data Page are Updated
'Override Position Data' and 'Use Position Data' Option in Job Data Page
Adding and Maintaining Person Of Interest in PeopleSoft
Hiring a Person in PeopleSoft
How to Resolve a Row Level Security Issue in PeopleSoft
How to find the List of Users Assigned to a Role
SQL Query to find all the Direct Reports for a Manager
Simplified Way to Provide a Page Access in PeopleSoft
Understanding Component Interface in PeopleSoft
Process Security in PeopleSoft
Scenario 2 (Dynamic Prompt using Derived Record Field):
You would have noticed many times in JOB_DATA component - Payroll page, when you select payroll system as "Payroll Interface" and then click on the prompt for "Paygroup" field you see the prompt as below:
But when you select payroll system as "Global Payroll" and click on the prompt button for Pay Group field, you see below prompt:
See the difference in two prompt pages, Its because in both cases the prompt table is different. In first case when you selected Payroll System as "Payroll Interface" then the prompt table for the field "Pay Group" was PAYGROUP_TBL whereas when you selected Payroll System as "Global Payroll" then the prompt table for the same field "Pay Group" was GP_PYGRP.
This is also called dynamic prompt, and it can be implemented using a field which is defined in record type "Derived/Worked" and is another way of implementing dynamic prompts.
This is also called dynamic prompt, and it can be implemented using a field which is defined in record type "Derived/Worked" and is another way of implementing dynamic prompts.
Now, Let us see how its been implemented.
Step 1: Add a field EDITTABLE6 in the derived record named - DERIVED.
Step 2: Open the record field properties of the field PAYGROUP in JOB table
Step 3: Add below PeopleCode in "Field Change" event of the field PAY_SYSTEM_FLG(Payroll System)
If JOB.PAY_SYSTEM_FLG = "GP" Then
If JOB.PAY_SYSTEM_FLG = "GP" Then
DERIVED.EDITTABLE6.Value = Record.GP_PYGRP;
Else
If JOB.PAY_SYSTEM_FLG = "PI" Then
DERIVED.EDITTABLE6.Value = Record.PAYGROUP_TBL;
DERIVED.EDITTABLE6.Value = Record.PAYGROUP_TBL;
End-If;
End-If;
So, if you understood both the scenarios explained above, did you find any difference between them ?
Well, Below is the difference:
Scenario 1 - Dynamic prompt is created using "Dynamic View" record definition and the rows selected in the prompt are controlled by SQL query supplied to the SQLTEXT property of record field based on certain condition.
Here, rows displayed in the prompt can be controlled but structure of the prompt remains same because underlying prompt record doesn't change.
Scenario 2 - Dynamic prompt is created using a field added in a record definition of type "Derived/Worked", the field name is used as the bind variable (%FieldName) which is mentioned in the record field properties. Then in the peoplecode, record definitions are assigned to this bind variable based on certain condition which becomes the prompt record.
Here, structure of displayed prompt appears different each time because underlying prompt record is changed.
Please also see -
Understanding Future dated security in PeopleSoft
Simplified Way to Provide a Page Access in PeopleSoft
How to find the List of Users Assigned to a Role
Hiring a Person in PeopleSoft
Peoplesoft Row Level Security Search RecordsPeopleSoft Functional and Technical Online Training
So, if you understood both the scenarios explained above, did you find any difference between them ?
Well, Below is the difference:
Scenario 1 - Dynamic prompt is created using "Dynamic View" record definition and the rows selected in the prompt are controlled by SQL query supplied to the SQLTEXT property of record field based on certain condition.
Here, rows displayed in the prompt can be controlled but structure of the prompt remains same because underlying prompt record doesn't change.
Scenario 2 - Dynamic prompt is created using a field added in a record definition of type "Derived/Worked", the field name is used as the bind variable (%FieldName) which is mentioned in the record field properties. Then in the peoplecode, record definitions are assigned to this bind variable based on certain condition which becomes the prompt record.
Here, structure of displayed prompt appears different each time because underlying prompt record is changed.
Please also see -
Understanding Future dated security in PeopleSoft
Simplified Way to Provide a Page Access in PeopleSoft
How to find the List of Users Assigned to a Role
Hiring a Person in PeopleSoft
Peoplesoft Row Level Security Search RecordsPeopleSoft Functional and Technical Online Training
SQL Query to find all the Direct Reports for a Manager
How to find the List of Users Assigned to a Role
Understanding Component Interface in PeopleSoft
How the Various Date Fields on Employement Data Page are Updated
Unable to See Future dated transactions in Job Data page in PeopleSoft
FTE For Multiple Jobs in PoeopleSoft
Business Unit, Company and Regulatory Region in PeopleSoft
How to find the List of Users Assigned to a Role
Understanding Component Interface in PeopleSoft
How the Various Date Fields on Employement Data Page are Updated
Unable to See Future dated transactions in Job Data page in PeopleSoft
FTE For Multiple Jobs in PoeopleSoft
Business Unit, Company and Regulatory Region in PeopleSoft
Want to learn PeopleSoft technical module thoroughly? I have several videos with total duration of over 50 hours.
Following is the link to the YouTube videos Technical
Click here to see course contents
Click here to know how it works
However, if you want to save money by purchasing whole module instead of in parts then visit this page to get more details PeopleSoft Functional and technical online training