smishler Posted January 8, 2007 Posted January 8, 2007 I am trying to make a script that will find and show the only record that user owns. For example, user 1234 logs in and is shown only his record, if it exists, if not he's taken to a start screen where he can create his record. On subsequent logins,1234 would be taken to his record. I want only a single record per user. This seems like it should be fairly easy but after a couple hours I am now going in circles. Please help (btw, this needs to run under IWP). Thanks.
mr_vodka Posted January 8, 2007 Posted January 8, 2007 You can try this. Have a global text field set with the User Name on the log in script. Then have a relationship keyed from the global field to the table with the user records. Then you can have a script like this: If [not IsEmpty ( usertable::username )] Go to Related Record [show only related records; from table: "usertable"; using layout: "ShowUser" (usertable)] Else Go to Layout ["Enter New Entry" (usertable")] End If or, you can use a method like this.
smishler Posted January 9, 2007 Author Posted January 9, 2007 Thanks. Your suggestion to use the global text field worked great!
El_Pablo Posted January 10, 2007 Posted January 10, 2007 (edited) Hi, I'm having exactly the same problem. The solution seemed good at the first, but what if many users log at the same time? What could be a good solution? Thank you Edited January 10, 2007 by Guest
Ender Posted January 10, 2007 Posted January 10, 2007 Since globally stored fields are tied to the session, there's no problem.
Recommended Posts
This topic is 6807 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