Setting Team Access to a Record
FeaturedOnce you have finished created your apps you may want to set team securities to your records to differentiate the users which has permission to edit or read the record or has no access to the record. This is known in Softools as Record Access Rights in which there are three types of security rights being None, Full and ReadOnly access rights.
There are 3 ways to set team access being:
- Manually
- With an Expression
- With a Lookup
Access rights which are set as None has no access to the record and users or teams with these rights cannot edit or read the record. ReadOnly rights allows them to only read through the record but cannot make changes to the record in which is possible with full access rights. Then if you have set up a team on your set you can set the Record Access Rights to the different teams.
There are three ways of accomplishing this which is by setting team access manually, from an expression or by a lookup. It is best practice to avoid setting record access rights manually. As the other methods set the access rights automatically making it easier and quicker to use especially if many records are expected to be created.
Setting Team Access Manually
Setting up team access manually is simple, first select the record which you want to select Team access rights.
Then click on the ellipses so that it will show a drop-down menu to reveal the Securities tab.
It will now take you into a pop-up menu to reveal the current access rights of the record. By default, only the creator of the record has full access rights and no other user or team is able to have access to this record. To change the access rights to the record click onto the Add Row button.
Then onto the new row change the Type to Team which would then allow you to select the Team to change access rights to on the Team column in which you can then change the access rights in the Access column to the access rights you wish to change to. Once all the access rights are set click onto the Save button and thus should be completed.
Setting Team Access via an Expression
To set team access from an expression it requires the usage of the Team field and a selection list. This method works by creating a selection list with the names of all the teams you want to use. Then by creating a team field which obtains its value from an expression where it uses an if statement to return a team ID from the selection list. Once the value of the team has been selected a workflow would then be triggered to set the access rights for the team. This method must be kept up to date by an app builder, so if a new team is added a builder would need to add it to the expression and selection list.
Configuration
To start we would first need to create a selection list and add the teams we want use for the app then click on Save.
Once that’s completed go onto the app and create a Selection field and use the selection list we have just created.
Then add a team field which we will use in our workflow.
Then under the expressions we will use an if statement which you can find out more here.
Finding Team Information
The expression will work by obtaining the ID from the teams app which is found on the grid icon at the top left of the site then by clicking onto the gear button so that the team app becomes visible. Once you have entered the team's app you should find the list of teams you want to use and by clicking onto the record you can find their ID.
Adding the Expression
The expression should look like the expression in the image below by using an if statement to find if the Team selection field is equal to its ID.
if([Team] = 'Demo', '615569c806b3894dd965d6bb', if([Team] = 'Test', '613f4e9f0334b915f426756b', ''))
Then add the selection field to the template to allow users of the site to select the teams.
Adding Workflows
Now comes the part where we add the workflows in which you go onto the Workflow V2 menu and click on Add which should take you to a page like the image below and give it a description to indicate what it’s purpose. If you are not familiar with Workflow V2 or would like to learn more about it you can find it here.
For the trigger node we will need to create multiple workflows for when a field is updated or if a record is created in this example field updated is used.
After the trigger node, a filter node is created to add some requirements to the workflow so a requirement used could be if the Team field is not empty.
Finally, comes the action node where the node type would need to be Update Record. The action for this node can then be to set ReadOnly access rights or to set full access rights but choose which ever works best for your site and select the Team field in the Target Team Field section, and now the workflow is complete. Which by then another similar workflow is needed but for the other trigger node which would be record create in this example.
Should both workflows be completed the workflow page should look similar to the image below and you can begin testing the workflow.
Once you have resynced the app hopefully now if you select a team from the selection list if should update the record access rights for the team.
Setting Team Access via a Lookup
If you are not familiar with lookup fields you can read more about it here, but essentially it allows an app to pull information from a different app. For this context we will use this lookup app to store the information of the teams and use workflows to set access rights. This method can be kept up to date by non app builders as they just need to add a new team by creating the records in the look up app.
Configuration
To start we would need to create a new app with two Text fields for the team’s name and the Team ID.
Finding Team Information
Fill in the fields with the team’s information and create as many records needed for all the Teams you would like to use. You can find the information about the teams on the grid icon near the top left of the screen which will take you to a pop-up menu which by pressing onto the gear icon should make the Team Settings app visible. From then on it should take you to a selection of teams where you can find their team's name and team ID.
Now on the original app, we will need to create three fields one for the lookup fields and two to send the information from the lookup app into for the app to use. From the image below a Team field is used instead of a text field this time around and this so we can utilise it for the workflow.
To configure the lookup field, you first would create a lookup field and then select the Lookup app in the Lookup App section.
Then by pressing onto the down arrow on the Add button it should allow you to press onto Add Field Mapping.
It will then show a popup menu where you create an ID and select the fields from the lookup app you want to bring information from and the field in the original app you want to send the information to. Do this for both the team name and the team ID and add the fields to your template, you do not have to include both the Team and the Team ID as they will be identical.
It should now show up onto your template and by pressing onto the magnifying glass it would show you the list of teams you have created.
Adding Workflows
Now comes the part where we add the workflows in which you go onto the Workflow V2 menu and click on Add which should take you to a page like the image below and give it a description to indicate what it’s purpose. If you are not familiar with Workflow V2 or would like to learn more about it you can find it here.
To create this workflow, we need three nodes of every node type being trigger, filter and action. Let’s create the trigger node in which we drag the Field Updated or Record Created node, as we would also need to create an additional workflow for the other, into the workspace. For this node we no further information is needed unless you would like to make some notes about it for future reference.
Then by clicking onto the blue ‘+’ button at the bottom right let's link this node to a filter node where we can add some requirements for the workflow such as when the Team ID is not empty.
Finally let’s create the final node being the action node where we set Update record as the action type. Then for the action drop down list select the access rights you would like to give to the team on the image below I have selected full access rights. Once that’s completed add the Team ID to the Target Team Fields then click on Ok and save. The Workflow is now complete and now we need to do the same for the other trigger node which you can simply duplicate the workflow by clicking onto the down button on the save button and switch out the trigger nodes.
There should now be two workflows which are triggered by a field update and a record creation.
Now you can test to see if the workflow is working by resyncing the app and adding a new lookup which should change the access rights to the team specified in the lookup field.
Please sign in to leave a comment.
Comments
0 comments