R2D2 Posted March 7, 2009 Posted March 7, 2009 (edited) This is possibly the most stupid question here so far, but... I have 2 tables: Calendar and Personnel In table Calendar I have field: cUser Unstored,=Get(AccountName) and in Personnel field tUsername. They are connected in relations table with symbol "=" When I try to fetch information from field Lastname in Personnel to be seen in Calendar -layout, I get only Is this "Unstored" the point I cannot get this to work ? If so, How can I get related information separately to different users logged in ? As I said, this might be the most stupid question here so far... EDIT// Uh oh... Problem solved. I dont't know how, but now it seems to work. I'll get back when I get it broken again... Edited March 7, 2009 by Guest
bcooney Posted March 7, 2009 Posted March 7, 2009 Calendar and Personnel should be related by Personnel_ID. That is, each Calendar record, when it is created should receive the foreign key for Personnel. You do have an auto-enter serial number field in Personnel that serves as a unique record identifier, named __kP_Personnel_ID?
Fenton Posted March 7, 2009 Posted March 7, 2009 I think you're both right. R2D2 wanted to associate the currently logged in user with his/her record in Personnel, from the Calendar, so he used an unstored calculation with Get (AccountName). That's fine. This relationship could then be used to fetch the Personnel ID of the user, which could be used in the Calendar. Though I suppose you could just use Account name(s) in the calendar exclusively, instead of IDs. But then you'd have to also have that Account name in the Appts. table, and any table that viewed Appts. by person. You would never want to change someone's Account, or there'd be a lot of fixing to do. But one just wouldn't.
bcooney Posted March 7, 2009 Posted March 7, 2009 I don't rely on Account names not changing. I usually capture a gStaffID and use that. At first I was going to say what you did Fenton, but I wanted to highlight his lack of serialIDs. Also, all he says is that from Calendar he wants the Personnel last name. And..he didn't mention Appointments..
R2D2 Posted March 8, 2009 Author Posted March 8, 2009 Yes Sir, That is what I wanted to do. I have Get(AccountName) -field in every table I use to identify the user. I don't figure out any smarter way to do that. The username is a required field in the Personnel -file, and it cannot be changed (or I'm screwed...). And it has to be the same username that is used in the Manage User Accounts. //R2D2
Recommended Posts
This topic is 5799 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