Highlighted
Frequent Contributor.
Frequent Contributor.
387 views

Javascript check Transition

Jump to solution
Is there a way for a javascript loaded via a custom form (see screenshot) to check the transition that's being executed? I want to do different things based on whether a field changes for a specific transition or on any other transition?
0 Likes
1 Solution

Accepted Solutions
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Javascript check Transition

Jump to solution
These functions are in issuedetails-frame-iframe (tmtrack.dll). They're hard-coded with values for the context. We're running 11.3. This particular app is using "responsive" (vs "legacy") forms.

variable: ids_transition_name
"ESI/TESI"
variable: nTransitionID
546
function: GetTransitionInternalName()
returns "CHECK_RIDE.INTERVIEWING_CRITERIA"

View solution in original post

4 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Javascript check Transition

Jump to solution
There is a form action that can be configured based on the transition, so could you use that and use different javascripts to set your fields. ie, if transition is x execute javascript 1, if transition is y execute javascript 2, etc, etc

Or have I missed what you are trying to achieve
0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Javascript check Transition

Jump to solution
These functions are in issuedetails-frame-iframe (tmtrack.dll). They're hard-coded with values for the context. We're running 11.3. This particular app is using "responsive" (vs "legacy") forms.

variable: ids_transition_name
"ESI/TESI"
variable: nTransitionID
546
function: GetTransitionInternalName()
returns "CHECK_RIDE.INTERVIEWING_CRITERIA"

View solution in original post

Highlighted
Frequent Contributor.
Frequent Contributor.

Re: Javascript check Transition

Jump to solution
David Sheaffe wrote:

There is a form action that can be configured based on the transition, so could you use that and use different javascripts to set your fields. ie, if transition is x execute javascript 1, if transition is y execute javascript 2, etc, etc

Or have I missed what you are trying to achieve


That's sorta what I'm looking to do, except I'm not clear on how to execute a javascript function loaded to the form (i.e. not pasted into the form action).
0 Likes
Highlighted
Frequent Contributor.
Frequent Contributor.

Re: Javascript check Transition

Jump to solution
Paul Thompson wrote:

These functions are in issuedetails-frame-iframe (tmtrack.dll). They're hard-coded with values for the context. We're running 11.3. This particular app is using "responsive" (vs "legacy") forms.

variable: ids_transition_name
"ESI/TESI"
variable: nTransitionID
546
function: GetTransitionInternalName()
returns "CHECK_RIDE.INTERVIEWING_CRITERIA"


I ended up using the GetTransitionInternalName() which when using the legacy forms is available under the View (tmtrack.dll) frame. This function also appears to be available to any scripts loaded directly to the form, so I was able to leverage the function directly in my attached javascript.

Thanks for the tip, I wish I knew a good way to look up some of these obscure functions/features available in the javascript. They should really add a reference to these inside of the Javascript developers help section in Composer.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.