Tuesday, May 28, 2019

Fluid Activity Guide step validation

Navigation Validation

The navigation at the top of the page will allow users to click through, which may not be what you want if you want the users to enter mandatory information before moving to the next step.
The MOS Doc ID 2309032.1 describes how to do it, especially when you are just moving from one page to another within a component.

Essentially you can add navigation buttons to the pages, e.g. add the fields to a subpage which can be added to each page. There should be one button per page.
I used fields named PTGP_CUSTBTN_PB_nn and added them to a Group Box (layout only), and added two specific style classes to each field:

  • ps_ag-custom-step-button-
  • psc_hidden
You can run something like this to get the item id:

SELECT LOWER(A.PTAI_ITEM_ID),A.PTAI_SEQ
FROM PS_PTAI_ITEM A
WHERE 1 = 1
AND PTAI_LIST_ID = 'FSU_KK_UPD'
ORDER BY A.PTAI_SEQ

Then in the FieldChange event you add the following to your navigation buttons:
Declare Function genOpenStepScript PeopleCode FUNCLIB_PTGP.FUNCLIB FieldFormula;

AddOnLoadScript(genOpenStepScript("fsukkudoct1", True));


So if you are on the first page, and you don't want people to skip to the second page without completing the first page you can add any validation you want before invoking the AddOnLoadScript() function.

A nice touch is to use a secondary modal page, and add all the messages (e.g. one for each field) to a long edit box. The Payment Request wizard in FSCM is a good example of this.


No comments:

Post a Comment