August 13, 200916 yr Hi, I have a privilege set called Standard User, In this users are limited to what records they can view with if ( UserField = get ( accountName )) My problem is that in form view, when a user clicks the background the fields fill with I am guessing that is because in my if statement there is no longer a record to access UserField and so it returns False. I have had a good look and cant see a workaround.. if anyone has got a solution, or a better way of separating different users data, i would really appreciate it. ) Thanks, Moaa
August 13, 200916 yr Are you limiting which Fields they can see or which Records they can see? If it's certain fields, then you could use 2 different layouts. If it's certain records, you could use 2 different tables.
August 13, 200916 yr Author I have a table called holiday request with; Start Date, End Date, Comment, User. I am limiting the records in this table that the user can see - so they can only see their own (User is autoentered as account name). How do you mean two tables, as in one for each user? Thanks, Moaa
August 13, 200916 yr Ah, ok then you won't want to do multiple tables. You could make a script that runs when the person wants to look up their holiday requests. The script would do a find just for their requests. You could have the layout so they can't navigate to it, and disable navigation while they are in that layout then have another button that puts them back to a default layout. Allow Toolbars Show/Hide Status Area
August 13, 200916 yr Author This is the kind of setup i have at the moment but.. users are limited to what records they can view with if ( User = get ( accountName )) My problem is that in form view, when a user clicks the background the fields fill with I am guessing that is because in my if statement there is no longer a record to access User Field and so it returns False? any ideas? any way of not allowing deselection of records or something like that, or script triggering on record deselct? Thanks, Moaa
August 13, 200916 yr Author hmm, im not sure im describing my problem very well.. i have the user settings in place so each user has their own set of records within the table and only their own are accessible by them. These are presented fine in list view. But, if the user goes into form view and clicks on the background - and therefore deselecting the record that is being viewed, my if statement in access and privileges fails to work. I believe this is because "if ( user = get ( AccountName ))" cannot get the active record and so cannot get the value of field "user" to compare to "get ( AccountName )" Hope this makes it more clear Thanks for your time, Moaa
August 13, 200916 yr Author Oops forgot to say, yes the User field is set to autoenter.. Thanks, Moaa
August 13, 200916 yr Clicking on the background in Form view does NOT deselect the record. It commits the record - IF user has been modifying it (and the layout is set to commit automatically). Otherwise it does nothing. You should check the actual contents of the User field, and compare it to the account name. There are two other points that bother me: 1. How exactly do users switch to Form view? Do they switch the view of the same layout, or are there two dedicated layouts? If two, did you set any custom privileges for the Form layout? 2. What EXACTLY is the condition under which users can view records? You say it is: if ( UserField = get ( accountName )) but that's not possible, because that is not a valid expression.
August 13, 200916 yr Author OK, so it could be that i have to turn of automatically committing the record... Unfortunately its on my computer at work so i will have to wait till tomorrow (im in the uk). This part of my database is to request holiday leave so there is one layout in list with all the pending requests, and to make a new request you are taken to a new layout in form view - the one i am having these problems with. I know that the account name matches up to the User field as i have tested it with multiple users and they always get their own records and no one else's. I did set custom privileges on the form layout. by if ( UserField = get ( accountName )) i meant UserField = get ( accountName ) (my bad) Thanks! Moaa
August 13, 200916 yr Automatically committing records should have no effect on user access - unless there is something like an auto-enter or a script trigger that modifies the value in UserField upon committing. I did set custom privileges on the form layout. And they are...? You should also make sure that the Form layout is set to show records from the same table. All things said, if this happens with new records only, then the most likely explanation is that UserField is NOT getting populated as intended. In such case user would be able to fill out a new record, and lose access upon committing it - exactly as you describe.
August 14, 200916 yr Do you have the Account Name being Auto Entered by Creation or by Modification? Have your users started using this database yet, or are these just happening as you are testing? Do you have this set up as a stand alone file or is it on FM Server?
August 14, 200916 yr Author Privilege set for holiday request table: View - limited by User = Get ( AccountName ) Edit - No Create - Yes Delete - No Field access - all All things said, if this happens with new records only, then the most likely explanation is that UserField is NOT getting populated as intended. In such case user would be able to fill out a new record, and lose access upon committing it - exactly as you describe. that makes sense but user is auto entered with: creation - account name cant modify and the user has access to the records in list view Do you have the Account Name being Auto Entered by Creation or by Modification? - Creation Have your users started using this database yet, or are these just happening as you are testing? - this is just testing at the moment Do you have this set up as a stand alone file or is it on FM Server? At the moment its being served from filemaker pro 10, but the eventual plan is to get it onto a server with fm server as we will have more than 5 clients Thanks for all your help, Moaa Edited August 14, 200916 yr by Guest
August 14, 200916 yr Author Thanks guys your comments got me thinking in a different direction and it turns out that user is the user who's sending and i only allowed viewing for the reciver, thanks a lot! Moaa ???
August 14, 200916 yr That's good news. Sometimes the answer comes when trying to explain it to someone else. ???
August 18, 200916 yr Use conditional formatting to turn the text to the background color when the record is part of the <> group. Steven
Create an account or sign in to comment