In PeopleTools 8.4, %SubmitScriptName is the meta-HTML javascript function used by all PeopleSoft component pages for triggering server-side actions. %SubmitScriptName is translated at run time (i.e., when the page is rendered) to submitAction_win0. It may be related to %FormName as submitAction_%FormName, since %FormName is also translated to win0. I don’t know how PeopleTools internally translates %FormName, but as far as I can tell it is always translated to win0 inside any component.

The %SubmitScriptName function is passed 2 parameters:

  1. form – the 1st parameter is the form object with the data to be submitted. On a component, this will be the win0 form in the content frame.
  2. action ID * – the 2nd parameter is a distinct text string which informs the component processor what action is requested or what type of action took place.


* – I just made up this label for the purpose of discussion.

The action ID that can be passed to %SubmitScriptName can be categorized into the following type of actions:

Toolbar Actions

Various component action buttons that are available on the toolbar are identified with the following action IDs.

Action ID Button Name
#ICSave Save | OK
#ICCancel Cancel | Return
#ICList Return to Search
#ICNextInList Next in List
#ICPrevInList Previous in List
#ICSendNotify Notify
#ICRefresh Refresh
#ICNext Next Page in Component
#ICPrev Previous Page in Component
#ICSpellCheck Spell Check
#ICAdd Add
#ICUpdate Update/Display
#ICUpdateAll Include History
#ICCorrection Correct History
#ICExpertEntry Expert Entry

Folder Tabs and Hyperlinks

For multi-paged component, the links to navigate among pages is identified with the following action ID: #ICPanel{page} where {page} is the position of the page in the component definition, starting at zero (0). This is true even if pages in the middle of the component are hidden.

For example the action ID for the 1st page link is #ICPanel0, 2nd page link is #ICPanel1, 3rd page link is #ICPanel2, etc.

Hot Keys

Pressing the hot keys which require a server trip also invokes %SubmitScriptName. This is identified with the action ID of
#KEY{code} where {code} is {modifier}+key_code. {modifier} can be a combination of the following:

  • A - Alt key is pressed
  • C - Ctrl key is pressed
  • S - Shift key is pressed

For example, the action ID when Alt+1 is pressed is #KEYA1. Alt+Shift+1 will be #KEYAS1.

Scroll Actions

Actions specific to scroll areas or grid have an action ID of {Scroll Page Field Name}${action code}${instance}. Here, {Scroll Page Field Name} is the Page Field Name of the Scroll Area or Grid. If the Page Field Name is unassigned in Application Designer, then PeopleTools generates a unique name.

{instance} is the instance number of the page element, starting at zero (0). A scroll at level 2 or 3 may be displayed multiple times on a page. In this case, {instance} would determine on which instance the action was performed.

{action code} identifies what type of scroll action is performed. The following are the list of action codes:

Action Code Action Description
hpers Personalize
hfind Find
hviewall View All
hexcel Download to Excel
htop View First
hup View Previous
hdown View Next
hend View Last
srt{n} Sort Column,
where {n} is the grid column number, starting at zero (0)
tab{n} View Tab,
where {n} is the grid column number preceding the tab
htab Show All Columns

As an example, a grid with the Page Field Name of GRID1 will have an action ID of GRID1$hviewall$0 when clicking the View All link of the grid.

An exception to the action ID specified above are the insert and delete buttons. The action ID of these buttons is a little different: {Scroll Page Field Name}${action code}${instance}$$0. The action codes are the following:

Action Code Action Description
new Insert One Row
newm Insert Multiple Rows
delete Delete Row

Page Field Actions and PeopleCode

Push buttons/Hyperlinks created in the page designer are invoked with the Page Field Name of the button as the action ID. Page Field Names of fields on other levels other than level 0, has ${instance} appended to the Page Field Name of page fields, making the action ID {Page Field Name}${instance}.

There is another special action ID for updating another field’s component buffer: #ICSetField%Page.{Page Field Name}.{new value}. This is handy if you’re writing javascript that communicate with PeopleCode. Calling %SubmitScriptName with this action ID updates the value of the field in the component buffer to {new value}, which would also trigger the FieldEdit and FieldChange events of the field on the server — unless {new value} isn’t really different from the previous value of the field.

Other notes on #ICSetField:

  • %Page is actually a meta-HTML for the name of the page containing the page field. However, it is not possible to update a field that is on a different page, so most of the time, you’ll only need to write %Page.
  • {new value} couldn’t contain a dot (.) — anything after the dot will be discarded/ignored by the server.

 

Final Notes

  • The list above is by no means a complete list. It’s a list I’ve kept around in the need to tinkering with page elements. The list are for those that I find notable or potentially useful.
  • When %SubmitScriptName is called and server processing takes place, expect all other deferred processing to be performed. This is simply how deferred processing works.