Displaying the currently logged user on the UI

Support for our integrated Contact Manager, Calendar, and Project Tracker.
Posts: 14
Joined: Fri Nov 19, 2010 11:03 am
PostPosted: Wed Dec 29, 2010 7:36 am
We found clicking the "pinned" tickboxes works for us only for "Everyone". While I am logged in as "FWK" marking and unmarking of the "FWK Tickbox to the right does not change the contents of the "pinned" list to the left.

Trying to debug this leads me to the Question "Who Am I" and I find the only way of discovering my identity is changing something eg. in a contact and looking at the lower left corner to see who has made the last changes to the dataset.

The "last Changed" entry does not reflect changes immediately but moving back and forth one record will show to my surprise that "ADMIN" has changed the dataset. But I am logged as "FWK"

Next Surprise ist found in the change Log:
12/29/2010 4:19:57 PM Franz Walter Klein Contacts::NameFirst Trudyn -» Trudy
12/29/2010 4:19:53 PM Franz Walter Klein Contacts::NameFirst Trudy -» Trudyn

Here FWK seems to be logged and changing the record?? It seems I am logged in the SeedCodeComplete.fp7 file as "FWK" and in the SeedCodeData.pf7 file as "ADMIN"

Any help is most appreciated.

Franz
Posts: 14
Joined: Fri Nov 19, 2010 11:03 am
PostPosted: Wed Dec 29, 2010 7:57 am
Another Thought:

Wouldn't it be nice anyway seeing somewhere on the UI who is currently logged in that session because of practical considerations?

We will be at least 5 people accessing the Calendar and especially the ladies tend to share computers and login names so after a while nobody really knows who changed what and whom to ask if there is a question. Because of these habits the change log does not always reflect the truth.

Currently we are using the "GoldMine" software product where the current user is always displayed. This makes it easy telling the ladies to please use their own login as it is easy seen. But how would this work if they can't even see the current user and just don't know if they are still logged themselves or somebody else logged in meanwhile without them knowing?

Any hint (especially code snippet) is most appreciated.

Regards
Franz

PS: While I do have 2 decades of programming experience I am completely new to FileMaker. So if I am asking nwbie questions please consider this before engaging the flame thrower.
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Wed Dec 29, 2010 8:27 am
No flamethrower needed. =)

There are two ways to show a logged in use in FMP:

Get( AccountName ) and Get ( UserName )

You can create an unstored calc with either of these and add it to your layouts to "see" the logged in user the way you do on Goldmine. A slightly more flexible way is to set one of those to global fields or variables in our Upon Opening script and show that as a merge variable on your layout. That is a little nicer since merge variables are independent of context: if you use an unstored calc, you have to have one such calc for each layout's context.

We've already done this for you in the script "Record Logged in Staff" and you'll see that script populates two global fields you can use on your layouts: like global variables, global fields are free of context.

So, the reason you see your own name in the change log, is that we use this when describing who changed a record...

If (Get( AccountName ) = "Admin" ; Get ( UserName ) ; Get(AccountName) )]

...because some deployments will have a number of people log in with the same Admin account. Get ( UserName ) gets the computer's user name, regardless of how you've logged in.

Another thing to remember, is that not all fields are tracked in the change log, so who last modified the record, and who is last shown in the change log can be different people.

As for how "pinned" actually works, it behaves differently when you're logged in with Full Access. You can learn more here: http://www.seedcode.com/pmwiki/pmwiki.p ... edContacts

Hope that helps,

John
John Sindelar
SeedCode

Return to SeedCode Calendar

Who is online

Users browsing this forum: No registered users and 1 guest

(855) SEEDCODE
[email protected]
Follow us: