Personas Binar Posted April 9, 2003 Share Posted April 9, 2003 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 Link to comment Share on other sites More sharing options...
CobaltSky Posted April 9, 2003 Share Posted April 9, 2003 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. Link to comment Share on other sites More sharing options...
Personas Binar Posted April 9, 2003 Author Share Posted April 9, 2003 Awesome! Thank-you...now to look at the names of several hundred workstations...lol I knew there HAD to be a way Cheers and a cold Fosters to ya mate!!! andrew Link to comment Share on other sites More sharing options...
Wendy T Posted April 10, 2003 Share Posted April 10, 2003 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 Link to comment Share on other sites More sharing options...
CobaltSky Posted April 10, 2003 Share Posted April 10, 2003 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?! Link to comment Share on other sites More sharing options...
Personas Binar Posted April 10, 2003 Author Share Posted April 10, 2003 Hmmmm....food for thought. Gives me something to mull over while commuting. Thank-you, and if not Foster's in Australia, then which beer? LOL Cheers Andrew Link to comment Share on other sites More sharing options...
Wendy T Posted April 11, 2003 Share Posted April 11, 2003 We only export the bad stuff, mate - we keep all the good beers for ourselves. For some reason the Poms seem to love our Fosters but you wouldn't find an Aussie who admits to drinking it. cheers (& beers) Wendy Link to comment Share on other sites More sharing options...
danjacoby Posted April 11, 2003 Share Posted April 11, 2003 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! Link to comment Share on other sites More sharing options...
Lee Smith Posted April 11, 2003 Share Posted April 11, 2003 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 Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 7851 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 accountSign in
Already have an account? Sign in here.
Sign In Now