Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Account Name in header


christw

Recommended Posts

Hi, I'm sure there's an easy way to do this but I can't just make it work as I want:

 

I want to display the currently logged on user in the header of each screen.

 

The user name is a standard which we use at work. I created a table with the various users and the username/login as key. I created a runtime field with a global field currentuser which I populate using a logon script with the get (accountname). I made a relationship between these two tables.

 

However, when I am on the user table, the accountname displayed changes with the current record on the screen.

 

Also, when on a particular layout which is the main purpose of the database, I need to use fields particular to the current user, when I call the field from the user table I get a blank probably because there is no relation with the current table on the layout.

 

I don't know if I explained myself well. Hope you can help.Oh Really!

Link to comment
Share on other sites

I created a table with the various users and the username/login as key.
It is considered bad practice to store user passwords in a table. It is very insecure. Also you should use filemaker auto-enter serials as relationship keys, never any kind of data that has any meaning in the purpose of the database. I suspect that your problem with showing related data is somehow tied in with this, but you have not provided enough information to go on.

 

However, when I am on the user table, the accountname displayed changes with the current record on the screen.

Hmm, is the display field text or calculated?

 

If you are working with a user table, make sure the user is on his own record throughout the session. Display content in this table using portals. This may involve scripting all navigation.

Link to comment
Share on other sites

I don't store the passwords in the table. The user table is just a table with the real name and surname and other details related to the scope of the program. Eg I store the initials which I need to use in another layout based on another table to create a special work related serial no.

 

I can't get these initials from the other layout and I'm stuck.

 

I use a custom validation routine to ensure that there are no duplicate users since I create the usernames myself using scripts as part of the running of the program.

 

I can easily put the accountname on each screen since it's store in a global field. The problem is getting the real name and surname related to this global field from another table. If there's any other way I can do it I will use it but I got this idea from a book on filemaker 8.5 but it did not explain it very clearly.

 

As regards the reason why the field changes in the user table layout is because being on that layout, the name and surname are directly related to the record on the screen and therefore would update with every change in record. I need to have that field independent of the table currently on the screen.

 

Sorry if I'm not clear. I know what I want to do but it's not so easy to explain in text.

Link to comment
Share on other sites

I don't store the passwords in the table.
OK sorry for jumping to conclusions.

 

I'm still not clear on your database structure though. All I can do is to suggest looking into using a startup script. It would

- navigate to the proper user record based on the accountname

- read all necessary settings into global variables ($$variables). Thus you have names, initials, account information, preference settings etc. available throughout the session in all tables, scripts and in calculated fields.

 

If you need more assistance, consider upgrading your membership so we can exchange samples, screen views of TO graphs and so on.

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

Terms of Use