Removing Ramp Messages from Previous Session

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
dhunt
Posts: 44
Joined: Fri Feb 08, 2019 3:06 am

Removing Ramp Messages from Previous Session

Post by dhunt » Wed May 13, 2020 8:29 am

I was wondering if it is possible to remove or clear messages if you move from one ramp screen to another? The message bar at the bottom of the axes screens seems to hold on to the messages and doesnt clear when you leave the screen. Also is there a way to hide the message bar if the axes screen is not being displayed due to navigation to another screen? Currently it flashes a message during navigation.

I did see 2 options but not sure which one is correct to use. One is in the ramp script and the other is a lansa code.


Where would the best place to add this? In the Server Module, an RP, etc? which is better to do with or without the mainform? The ramp script appears to do nothing.

Code: Select all

#AVFRAMEWORKMANAGER.avClearMessages Requester(#COM_OWNER) Inmainform(true)

#AVFRAMEWORKMANAGER.avClearMessages Requester(#COM_OWNER)

MarkD
Posts: 657
Joined: Wed Dec 02, 2015 9:56 am

Re: Removing Ramp Messages from Previous Session

Post by MarkD » Thu May 14, 2020 11:04 am

See https://docs.lansa.com/14/en/lansa048/i ... 8_8220.htm for standard RAMP session exit points.

If you decided to use avRAMP_SHOW_CURRENT_FORM then the current command handler reference (passed in a a parameter) should be used instead of #COM_Owner here:

#AVFRAMEWORKMANAGER.avClearMessages Requester(#CommandHandler) Inmainform(true)

I'm not sure whether this will work, or that you can figure out when to display the messages -v- clear them, but it's probably worth a try.

dhunt
Posts: 44
Joined: Fri Feb 08, 2019 3:06 am

Re: Removing Ramp Messages from Previous Session

Post by dhunt » Tue May 19, 2020 6:20 am

This unfortunately doesn't look like it works in all cases. A message being created that is still showing up 3 screens later under another option is still an issue. Is there a persistence option on messages that might have it not clear after moving away from that screen?

MarkD
Posts: 657
Joined: Wed Dec 02, 2015 9:56 am

Re: Removing Ramp Messages from Previous Session

Post by MarkD » Thu May 21, 2020 11:14 am

I don't think there is a persistence option (by default) on messages plucked from 5250 screens.

Your arrive scripts so be using function GET_FORM_MESSAGE to get the visible message :

https://docs.lansa.com/14/en/lansa050/i ... 0_0940.htm

I would first run through the problematic 5250 screens step-by-step and compare the trace events with what you see on the 5250 screen.

You could maybe even try using script code like:

GET_FORM_MESSAGE(22); /* Extract messages and hide the message line */
if (this.vLastMessage != "") ALERT_MESSAGE("RECEIVED:" + this.vLastMessage);

to check exactly what 5250 message(s) arrive.

Post Reply