HATS: Doing different things with the same screen at different times

Off
Strongback Consulting

This is something I get asked about often regarding Rational HATS. Usually the person wants to run a macro on a screen under one circumstance, and display it with a transformation on another circumstance. For example, let’s say you want to combine two disparate screens of read only data. The first time you get to the first screen, you need to run a macro, collect the data, navigate to the second page, collect its data, then navigate back to the first page. Question: Since the page you kick off the macro on is the same as the one you display, how do you distinguish between the two with screen recognition?

The answer, is to set a globabl variable the first time you run the macro. Then have two separate screen customizations (with separate screen recognition criteria). One does a typical text based recognition. The other one uses the global variable recognition.

Now you may be tempted to put the macro and the transformation on the same screen customization. If you do , you will find the macro never runs. That is because a transformation will always execute first, and macro will always run last.

Comments are closed.