Jump to content
Sign in to follow this  
Tissot

User settings form a Record

Recommended Posts

Hi,

When User opens the File, the Current Users record should display.

med_1196748237-UserLogin.gif

What am I doing wrong in the Relation?

Regards

Ron

UserLogin.gif

Edited by Guest

Share this post


Link to post
Share on other sites

Your post is a bit cryptic.

1. Why would a the current users information display when they open a file? Did you set a startup script with 'File Options..."

2. Perhaps what you mean to do is have users open the User_LoggedIn table which is populated by a single record. The user information should be accessible only when they enter u.AccountName.

3. Your relationship graph shows two tables connected with a sideways 'T' on the left side. This means that this is relating to a field that for some reason can't be generated by the relationship (probably its a calculation)

Share this post


Link to post
Share on other sites

Hi

1. Yes ( I want to grab info like GUI Language, Access...)

2. No, the record dont even need to diplay, because the script only gets the info for setting (language etc.) up on startup.

3. Yes, Get(AccountName)

Sorry for the confusion.

Ron

Share this post


Link to post
Share on other sites

I still don't quite get it. Which file is the user opening? Which table will they viewing? What behavior are you trying to achieve? What happens when you try it?

Share this post


Link to post
Share on other sites

Maybe you're after this:

1. User logins in.

2. Open Script has steps to

go to users layout

find in the AccountName field Get (AccountName)

3. Now you know the UserID. Publish it to a global variable, and any other "session" prefs that you'd like to either global fields or variables.

Share this post


Link to post
Share on other sites

Exactly, but I'm obviously to dumb to do it.

But can I not do that via a relation? (I hate Preform Find)

Regards

Ron

Edited by Guest

Share this post


Link to post
Share on other sites

Oh, come on! Just follow my steps.

You'll need an AccountName field in your Users table.

Sorry, it's a find, since you're making use of FM's Get (AccountName). Really, not a problem.

Edited by Guest

Share this post


Link to post
Share on other sites

I know how to do it via Perform find....... so it seems like it’s the only way?!?!

Thanks for reminding me to stop thinking and get on with the job. How can you stop this syndrom? B)

Regards

Ron

Share this post


Link to post
Share on other sites

Only way I know. SOP really. I think it's funny that you need to stop thinking to get on with the job. I have to try developing that way.

btw, aren't periods in field names a no-no?

Share this post


Link to post
Share on other sites

Well FM Developing is easy isn't it? Come on, you hardly need your Brain...(uppps... I must have forgoten about the previous post)

I always use periods?!? Never been a problem. How do you do it? I'm always open to learn more.

Ron

Share this post


Link to post
Share on other sites

I think you'll find that alot of people have a different field naming scheme. There is a thread on it somewhere here. In fact I think Barbara started it.

I prefer the "_" Such as "Name_First"

Or "c_Total_Cost" "c" meaning it's a calculation field. Makes it easy to find fields if you have a lot of em.

Michael

Share this post


Link to post
Share on other sites

Did I start it? Oh, yes, the Best Practices thread. Have you read the FM Dev Conventions doc? They explore naming conventions in detail. I use the Name_First way.

Share this post


Link to post
Share on other sites

Did I start it? Oh, yes, the Best Practices thread. Have you read the FM Dev Conventions doc? They explore naming conventions in detail. I use the Name_First way.

No I haven't I just learned from getting help here over the years looking at others naming schemes and adopting what seemed logical. I'll have to read it though.

Michael

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.