2 Replies Latest reply on May 16, 2011 8:41 AM by philmodjunk

    User Record Viewing via Priviledge Set Calculation Help Needed

    xxx202xxx

      Title

      User Record Viewing via Priviledge Set Calculation Help Needed

      Post

      I have a Layout call "Service" that pulls data from 3 tables (Contact, Service mgmt and Asset).  I have Privilege Sets for "specific-users" to open the DB and automatically get sent to the "Service_Layout".  I want these "specific-users" to only view records that pertain to them.  The custom privilege set window I have set to Service::Contact = Get (AccountName) but when I log onto the system as a "specific-user" I get all of the Records but only the records that pertain to the "specific-user" is visable, all other records say NO_Access which is cool, but. . . .

      I only want the user to see their records only, so if out of 95 records, 6 are theirs then I only want them to see 6 records not 95 with 89 being records with no access and their 6 sprinkled throughout.

      I have tried to create a script so when the specific-user opens the db it would perform a find for their records based on their service mgmt::Contact information but I can't seem to get the script to run correctly.

      if[get(accountPrivilegeSetName)="specific_user"]

      go to layout["service"(service mgmt)]

      perform find[]   'under perform find I have the criteria set to service mgmt::contact = Get(AccountName)

      Please help.

       

        • 1. Re: User Record Viewing via Priviledge Set Calculation Help Needed
          RestaurantCharlie

          What you are describing in theory works. So there must be a detail you missed. Can you upload your exact script to try to help you find the flaw?

          I have the same issue with our solution. What I did was I created a calculation field on the table that examines if they can view it. It can be as simple as USER_CREATED=get(accountname), or you can have the calculation run many different criteria, but in the end the technique is to have the field display a 1 if the user can view it, and then perform a find on that field and search for one.

          • 2. Re: User Record Viewing via Priviledge Set Calculation Help Needed
            philmodjunk

            BTW, you don't need much for criteria here. Any find you perform with valid criteria should automatically filter out the "no access" records from the found set.

            Something as simple as

            enter Find mode[]
            Set field [Service Mgmt::NeveryEmptyfield ; "*" ]
            Set Error Capture [on]
            Perform Find[]

            Should find all records, but then filters out the "no access" ones they aren't permitted to see.