Jump to content
  • 0

Client Provisioning Help


ccxc007

Question

Can someone point me in the right direction to accomplish this.

We are using directories for provisioning. We have a global data table that contains all of our clients data. We need to be able to configure each user in directories to a specific client (client have multiple users) so that when they login to view the global data table they only see the client data they are provisioned for. I know this can be accomplished by added a free text field for "client name" and ensure "client name" is a value in the global data table. However, free texting is error prone. I would like to have a "client name" drop down in the directories that is sourced from a client list table. 

I am open to any other way to accomplish this. I was thinking Directories>Groups might do this but I have had no luck. Thank you in advance. 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hello @ccxc007,

First of all, since each user is connected to 1 client, the correct approach is to create relationships between the tables.

It is not a good approach to store the "client name" even if it is listed in the table. You need to store some ID value instead.

1) Let`s say here is the table to store info about clients. In my example, its name is "Global_Clients":

8URNsa2.png

2) The Directory is actually a table too. In the Directory table, you need to add a field to store the assigned client.

You need to select the correct data type for this field. It must Integer if the ID in the "Global_Clients" table is an Autonumber. Or it must be Text(255) if the ID in the "Global_Clients" table is GUID, Random ID, or Prefixed Autonumber https://howto.caspio.com/tables-and-views/relationships/database-relationships/

This is the example:

Ws4FkmD.png

 

3) Under the Relationships you need to connect these 2 tables and select a user-friendly value in the 'Display Value' dropdown https://howto.caspio.com/tables-and-views/relationships/relationship-settings/

In my example, it is the 'FullName " field.

3X0x2JU.png

4) When the fields are connected under the Relationships, you will be able to see the list of values in the 'assigned_client' field under the Directories.

It is visible when you edit the user info. In my example, it is a list of full names from the "Global_Clients" table. If you don`t select any value in the 'Display Value' dropdown in the Relationships settings, you will see the list of IDs.


az2czOm.png

5) An alternative option to assign a client is to create a Report DataPage based on the Directory table (the "All_users_dir" table in my example), enable any edition option(s) (Inline edit, Grid edit, Bulk Edit), and assign clients there:

91Ca2PU.png

 

NEQZOmo.png

 

6) Then you can use the Record Level Security option to restrict access to the records https://howto.caspio.com/authentications-and-connections/authentication/record-level-security/record-level-security/

For example, this is the Report DataPage authenticated by the Directory. Its data source is the "Global_Clients" table.

Under the RLS, we need to match the client ID from the "Global_Clients" table and the client ID stored in the "All_users_dir" table (Directory).

gdsLtBu.png

As a result, the logged-in user can only see info about the assigned client.

 

Hope this answers your question. 

Link to comment
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
Answer this question...

×   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.

Loading...
×
×
  • Create New...