Page 1 of 1

Automatically opening multiple tabs in Atrium

Posted: Thu Aug 16, 2018 5:56 pm
by PaulT
I have a request from a user regarding Atrium and having certain 5250 tabs automatically open when Atrium is started.

1. Can we have a set of tabs automatically opened for a user when they start an Atrium session?
2. Can this be driven by use profile - so that each user profile has his/her own set of automatic tabs?

They would like to automatically have say, a customer inquiry screen, an inventory screen, and a shipping statistics display all open when they first sign-in.

Is this possible?

Thanks for any information.

Paul

Re: Automatically opening multiple tabs in Atrium

Posted: Fri Aug 17, 2018 9:55 am
by Emily
Hi Paul,

You should be able to accomplish this using some JavaScript with our Atrium API. To do this, you'll want to use the following API:

Atrium.onload(): http://www.profoundlogic.com/docs/pages ... d=27590756
Atrium.getUser(): http://www.profoundlogic.com/docs/pages ... d=12648660
Atrium.launchItem(): http://www.profoundlogic.com/docs/pages ... Id=7864724

As a simple example, if I wanted to open three menu items automatically whenever user "TESTUSER" signs into Atrium, I could do something like this:

Code: Select all

Atrium.onload = function() {
	if (Atrium.getUser() == "TESTUSER") {
		Atrium.launchItem(103, true);
		Atrium.launchItem(104, true);
		Atrium.launchItem(105, true);
	}
}
Whenever Atrium loads for the first time, it will get the username of the user who signed in. If the username is "TESTUSER", then it will automatically launch the menu items 103, 104 and 105.

You'll want to place this JavaScript in a .js file and place the file in the following directory:

/www/InstanceName/htdocs/profoundui/userdata/extension/atrium/

I hope that this helps!

Re: Automatically opening multiple tabs in Atrium

Posted: Mon Aug 20, 2018 8:57 am
by PaulT
Thank you Emily.