Wednesday, 28 December 2016

How to use Call Section


There are multiple scenarios when we need to call section in an Application Engine. There are two ways to call section:

  1. By using Call Section Action
  2. Dynamic Call Section
Now discuss both in detail

1. By using Call Section Action

This is very simple and commonly used way to call section. In this we have to select only Section Name and Program ID

Saturday, 17 December 2016

Custom Run Control Page


Sometime we have requirement to run specific Application Engine or SQR through Run Control page with custom parameters. It's very easy to create custom run control page juts follow the below mentioned steps:

Step 1: Create Run Control Record

Open delivered record definition "PRCSRUNCNTL" and create a copy of this record. While saving the record, it will ask for to save PeopleCode also click on YES. Now we have to replace the PeopleCode record definition name references as it contains references of "PRCSRUNCNTL" record to our new custom record definition i.e.. "DM_RUN_CNTL"


As we can see, PeopleCode is written on:
  • OPRID.RowInit
  • RUN_CNTL_ID.SaveEdit
  • LANGUAGE_CD.RowInit
  • LANGUAGE_OPTION.FieldChange
After changing, build the record.

Step 2: Create Run Control Page

First, create new page and insert subpage "PRCSRUNCNTL_SBP". After insert, double click on subpage and its properties will open. We have to change the Subpage Record Name Definition value to our new custom run control record.


Now save the page. There is no need to add the default Run Control fields onto the page (OPRID, RUN_CNTL_ID, etc..).  These values will be populated automatically through PeopleCode. 

Step 3: Create Run Control Component

  • Create a new Component definition.
  • Set the Component Search Record to your custom Run Control Record.
  • Save the Component with a new name.
  • Register your Component using the Registration Wizard.
That's it our new custom run control page is ready.



Monday, 28 November 2016

Optional Prompt in PS Query

Sometimes we need to create a PS Query with optional prompt i.e. if there are 3 prompt in  PS Query then if user enter a value, the query fetches relevant rows otherwise it fetches all the rows. 

For example we created a PS Query which have 3 prompt as shown in below screen


Now if we only pass birthdate then we will get this result


Now there is way to bypass this error and fetch the data on the basis of birthdate. To achieve this we need to add expression in our PS Query. If criteria is character type then we have to add expression ' ' like this


*Please make sure, there should be space between single quotes (' '). 

 If criteria is number type then we have to add expression with 0 like this


After adding expression, final step is we need to group criteria and expression like this


Make sure, while grouping the criteria the logical action should be OR not AND. Now, check whether we get data after passing the same birthdate or not



We get the data only after passing birthdate. In short for optional prompt first we need to set expression and then grouping of that criteria.