Retrieve screen name of UNKNOWN_FORM from RAMP

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
rgjohnson
Posts: 3
Joined: Thu May 26, 2016 12:42 am

Retrieve screen name of UNKNOWN_FORM from RAMP

Post by rgjohnson » Tue Nov 19, 2019 9:56 am

Attached is a RAMP trace that includes navigation to an UNKNOWN_FORM.
RAMP Trace UNKNOWN_FORM.jpg
RAMP Trace UNKNOWN_FORM.jpg (82.29 KiB) Viewed 118 times
The actual axes screen name is know and included in the trace, but all screen name values available to a RAMP script are changed to UNKNOWN_FORM. I have to know the actual axes screen name for each form including UNKNOWN_FORM. How can I get this?

I tried creating a function in USERENV.js to retrieve the screen name and then use a SHARED function to execute the USERENV function to retrieve the name, but it seems that all references to the screen name are changed to UNKNOWN_FORM after the actual name is written to the trace as shown above.

Tim McEntee
Posts: 11
Joined: Thu May 26, 2016 8:46 am

Re: Retrieve screen name of UNKNOWN_FORM from RAMP

Post by Tim McEntee » Tue Dec 03, 2019 12:02 pm

Hi RJ

RAMP does not allow you to talk to the aXes engine directly, but there are ways around this by getting aXes to talk to the USERENV object.

1) a) in USERENV add a variable:
myAXES : null,
b) in aXes application onSignon event assign AXES to USERENV.myAxes:
USERENV.myAXES = AXES;
c) in your RAMP script you can access the AXES object via USERENV.myAxes:
This should give you your aXes screen name
USERENV.myAXES.currentForm.matchedDefinition.name

Tim

rgjohnson
Posts: 3
Joined: Thu May 26, 2016 12:42 am

Re: Retrieve screen name of UNKNOWN_FORM from RAMP

Post by rgjohnson » Thu Dec 05, 2019 3:26 am

Hi Tim

That worked perfectly!

Thank you

Greg

Post Reply