Page 1 of 1

Conditional behavior for the same field on the same screen?

Posted: Wed Jan 28, 2015 3:24 pm
by rmarsh
I have a display screen for some 3rd party software that shows information on the intro screen then replaces that information with menu options on subsequent menus. I would like to modify this screen so that it behaves differently for the intro page than it does for the menu. The trouble is Genie identifies the fields as the same on all the screens. In reality they are probably the same and the software is just replacing the screen content.

My question is: Can I get Genie to show the same field as output for the intro screen and be a hyperlink with a .js for the menu screens without having to customize a bunch of different screens? If I identify the menu generically enough, Genie will treat them all the same way... I think.

Any suggestions?

Thank you.

Re: Conditional behavior for the same field on the same screen?

Posted: Wed Jan 28, 2015 5:21 pm
by Alex
You should be able to do this with some JavaScript on the onload event. You can test for content on the screen and based on that set any fields' properties.

For example:

Code: Select all

if (get("D_1_1") == "some value") {  // test for some value on the screen to determine if hyperlink transformation should occur
  applyProperty("D_3_3", "field type", "hyperlink");  // transform to hyperlink
  applyProperty("D_3_3", "onclick", "alert(''Clicked!)");  // attach onclick event
  // etc.
}
Of course, I am using generic id's and values in the code above. You will have to customize this to account for your requirements.

For more information on our JavaScript API, see here: http://www.profoundlogic.com/docs/displ ... +Reference