Jump to content
Sign in to follow this  
aguest

Login Script

Recommended Posts

Hi,

 

I have the attached log in script that is running on my db to provide access to colleagues to certain records.

 

I've just been informed that one colleague can see more than they are allowed so I've had a look at the script using the debugger again.

 

When testing previous it worked fine, however, now that there are multiple users (via Pro app) on the system, it appears that it is not picking up the right accountname from the table but storing the accountname of the last person who logged in.

 

Is there a step I can add that will get it to clear out the last login information from the script once someone initiates the script.

 

It is possible that two or more people could initiate the scriipt at the same time.

Thanks
Ann

 

post-112258-0-79218900-1422538060_thumb.

post-112258-0-71157200-1422538430_thumb.

Share this post


Link to post
Share on other sites

I don't quite follow.  You go to the layout but you always test against the first record (or whatever record you land on)?

 

Can you describe in words what you are thing to do with the script?

Share this post


Link to post
Share on other sites

Hi Wim,

 

When the teacher logs in, I want to look up the account name they've logged in with in a Dept table to see if they are head of dept. If they are, then I want to give them access to only the records of the staff members in that depts. I find this in the staff table by using the DeptCode given to each staff member.

 

However, if they are a member of the SLT (not in the HoD table) they get access to all staff records.

 

Thanks

Ann

Share this post


Link to post
Share on other sites

Hi Wim,

 

When the teacher logs in, I want to look up the account name they've logged in with in a Dept table to see if they are head of dept. If they are, then I want to give them access to only the records of the staff members in that depts. I find this in the staff table by using the DeptCode given to each staff member.

 

However, if they are a member of the SLT (not in the HoD table) they get access to all staff records.

 

Thanks

Ann

Share this post


Link to post
Share on other sites

The part that I'm not getting is the second line of your script.  You do an IF to check the account name.  But no find.  So it will check against whatever record that layout happens to be on.  Not against all records if that is what you are expecting.

Share this post


Link to post
Share on other sites

Thank you, I've performed a find on the layout and it works fine.

Sorry if my errors seem very numpty like. I'm trying to teach myself and still getting to grips with how filemaker works. I appreciate all the help and advice. :yep:

Share this post


Link to post
Share on other sites

hi aguest, please i will love you to put me through on how you achieved your result.. Your case is very similar to mine.. Maybe your idea will really go a long way to assist me.. Here is what i want to achieve

Please, how can a staff be restricted to

his/her own staff page.. ie redirecting a

staff to his/her own page (staff layout)

once he/she logs in. The essense is to

limit staff view of other staff's pages

and hence activities..

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  

  • Who Viewed the Topic

    1 member has viewed this topic:
    bcooney 
×
×
  • Create New...

Important Information

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