Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7901 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hello world:

Anybody able to point me in the direction of how I can re-direct a user to a certain layout based on their machine name? I would like to do this in the open script as to avoid a login. (for the time being) Managers, Production, Sales, and us Techies, share the same data but have different uses for it. Thanks so much for ANY feedback.

Cheers and Beers

Andrew

Posted

Hi Andrew,

It can be hard coded, like this:

If ["Status(CurrentUserName) = "FirstWorkstation" "]

Go To Layout ["Layout 1"]

Else

If ["Status(CurrentUserName) = "SecondWorkstation" "]

Go To Layout ["Layout 2"]

Else

If ["Status(CurrentUserName) = "ThirdWorkstation" "]

Go To Layout ["Layout 3"]

End If

End If

End If

But if you have a lot of workstations and/or a lot of layouts, it will be tedious to code and maintain. In which case, I'd recommend that you make the process relationship driven.

That would entail creating a file with two fields - 'WorksationName' (a text field) and DefaultLayout (a number field) in which you store the name of each workstation, and the number of the layout you want it to start on - one record for each workstation.

Then in your main file, create a global text field called 'gWorkstationID', and a relationship called 'WorkstationData' which matches the gWorkstationID field to the WorkstationName field in your reference file.

With the above in place, your start-up script can simple include the following:

Set Field ["gWorkstationID", "Status(CurrentUserName)"]

Go to Layout ["WorkstationData::DefaultLayout"]

which will look up the appropriate layout for the current workstation from the reference file and take the user to it.

The advantage of this approach is partly that it is easy to script, but more importantly, it is very easy to add unlimited numbers of new workstations, and/or edit the default layouts assigned to them. cool.gif

Posted

Fosters? I wouldn't wish that on anyone!

As the FM user name can be changed by users, is there a way I can use something more robust, like the machine's IP or another identifier?

cheers,

Wendy

Posted

Hi Wendy,

There are several ways to make systems such as layout switching more secure.

The 'conventional' way is to use the inbuilt access privileges. To do this, you would ensure that each user has a password which is assigned to a group according to which layout/s he/she should be directed to. These can be additional groups without any specific privileges attached, that simply refer to layout preferences - so if you already have groups assigned for other purposes, you can simply add to what is there (giving each user an extra group) rather than rebuilding it on different principles.

Once the user access privileges are configured appropriately, you would be able to use a script sequence along the lines of:

If ["PatternCount(Status(CurrentGroups), "Managers")"]

Go To Layout ["Administrative Overvieww"]

Els

If ["PatternCount(Status(CurrentGroups), "Marketing")"]

Go To Layout ["Summary Reports"]

Else

If ["PatternCount(Status(CurrentGroups), "Admin")"]

Go To Layout ["Data Entry"]

End If

End If

End If

Or - using the relational model I was discussing with Andrew, you would establish a related resources file of group configurations and their associated layout numbers, then use something like:

Set Field ["gWorkstationID", "Status(CurrentGroups)"]

Go to Layout ["WorkstationData::DefaultLayout"]

However since a user can be in more than one group, you will have to deal with the fact that by either ensuring that in such cases, only one of the groups is listed in the reference file - or that the WorkstationData relationship has a sort order specified (eg a custom sort order by layout) which enables the appropriate default to be chosen when more than one related record is accessed.

Beyond that, there are various security options involving plug-ins and/or custom login implementations (including third-party products that will retrieve the machine IP or the hard drive serial# etc). But hopefully the above has given you some ideas to work with?! wink.gif

Posted

We only export the bad stuff, mate - we keep all the good beers for ourselves. smirk.gif For some reason the Poms seem to love our Fosters confused.gif but you wouldn't find an Aussie who admits to drinking it.

cheers (& beers)

Wendy

Posted

Foster's has a terrific ad agency, and in case you don't think Americans are susceptible to advertising, just look at who's inhabiting the White House (I refuse to call that idiot the President).

Oooh, I'm gonna get sued!

Posted

I don't think you are suppose to discuss politic on this list. So take you political thoughs and shove them where the sun don't shine

This topic is 7901 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.