Recent

Lock down specific list or form columns with a workflow

Although it is not possible to just lock down specific columns on a list, it is possible to use a workflow to create and sync two lists together.  One list would be available publicly or to a larger audience, and the other list you could lock down to just 1 or more groups.

In this example all edits are happening on the locked down list, then the status and who is assigned the issue is updated on the public list.  Essentially it’s a locked down issue work list where we wanted to publish some of the information publicly.

Setup a public list to go along with a locked down list

1. Create your Nintex form or List that will be locked down, in this example we have a short form that only has 5 fields:
Private-Public-lists-15-1
2. On your locked down list, create a new column called Entry Created, Choice, Not required, No and Yes for the choices, Drop-Down Menu, No for the default choice.
Private-Public-lists-15-2

3. Our workflow is actually going to check this value and change it so we need to hide this field. Go to List Settings > Advanced Settings > Allow management of content types: Yes. Then back on the List Settings screen click on the Item content type, click on the Entry Created column, and choose Hidden. Click OK to save your changes.
Private-Public-lists-15-3

4. Now we are going to create our new list to show the selected columns from our locked down list to a broader audience. Create a new Custom List, name your new list, and then start creating the columns. The first column you need to create is the LinkedID column, make it a number column, make the field required, and 0 for number of decimal places. This field will be populated by our workflow and will store the ID number of our linked entry from the locked down list.
Private-Public-lists-15-4

5. For all the other columns that you want to duplicate from your locked down list, use the same Column Name as the locked down list but make all the duplicated columns either a Single line of text, Multiple lines of text, or number field. The reason we don’t use choice fields or people fields on this list is over time that could create errors if the choice column is updated on one list but not the other or if someone specified in a people picker field leaves the organization. By just storing data in one of these 3 column types, we eliminate that problem.
Private-Public-lists-15-5

6. Optional – If you want to store the name of the person who created the item in the locked down list. Create a new column Called Submitted By and make it a single line of text field. A ‘Created By’ field already exists on this list so we need to name that field something else.
Private-Public-lists-15-6

7. Here’s an example of my public list, we are going to 4 columns of information and then the LinkedID column as well on this list.
Private-Public-lists-15-7

8. Now it’s time to create the Workflow. Return to the Locked Down list, and go to the Create a Workflow in Nintex Workflow option.
Private-Public-lists-15-9
9. The first action on our workflow is the Action set action:
Private-Public-lists-15-10

10. Double click on the Action set action, click on the Common tab option, click the Run as workflow owner option. This will run all actions in this action set as the person who publishes the workflow. This allows us to lock down the public list so only the workflow can add new items or update new items on it.
Private-Public-lists-15-11

11. Add a descriptive title to the Action set action, the little shield shows that this action set is setup to run as workflow owner.
Private-Public-lists-15-12

12. Add a Set a condition action under the Action set.
Private-Public-lists-15-13

13. Configure the Set a condition action so: Condition – If current item field equals value, Where – Entry Created, equals, Value – Yes. What this condition is checking is if an item has already been created on the public list for this entry.
Private-Public-lists-15-14

14. Add a descriptive label for the Set a condition, then add a Create item action under the No branch.
Private-Public-lists-15-15

15. Configure the Create item action, Create item in – [Choose the name of whatever your public list is called], you should see that any required fields on your Public list are already listed at the bottom once you choose your list:
Private-Public-lists-15-16
16. Using the Field dropdown, you can add the other columns you want to populate as well:
Private-Public-lists-15-17

17. For all non-people picker fields, click on the document icon next to the field and choose the corresponding Item Property. So Title on the public list should equal the Title on the locked down list for example. (People pickers and the LinkedID instructions are in step 18 and 19).
Private-Public-lists-15-18

18. For people picker fields, change the Value dropdown to User Profiles. For source choose Name, and then click on the document icon to insert the reference to the people picker field on your locked down list. So in the example below I’m getting the Assigned To person’s name and the Created By persons name:
Private-Public-lists-15-19

19. For number fields such as LinkedID, change the Value dropdown to List Lookup, Source – Current item, Field ID. This will populate the LinkedID field on the public list with the unique ID number of the item on the Locked down list:
Private-Public-lists-15-20

20. This is what my completed Create item action looks like:
Private-Public-lists-15-21

21. Directly underneath the Create item action, add a Set field value action. Configure this action so the Entry Created column, Equals – Value – Yes. What this does is change the Entry Created field on our locked down item to Yes after we create the item on the public list.
Private-Public-lists-15-22

22. On the Yes side of the Set condition action, add an Update item action.
Private-Public-lists-15-23

23. Configure the update item action. Update – [Name of your Public List], Where – LinkedID, Equals – List Lookup, Source – Current item, Field – ID. What this does is ensures that the linked item in your public list is updated if anything changes on your locked down list.
Private-Public-lists-15-24

24. Now we need to set what fields might need to be updated. This should not include the LinkedID field nor the Created By/Submitted By field as those will not change after an item is submitted. Again use the Field dropdown to add any additional fields and then setup the field mappings just like you did in the Create item action.
Private-Public-lists-15-25

25. Your Completed workflow should look like the example below. If you are adding this workflow to a list which already has real data in it, please on Save your workflow and do not Publish it yet, then submit a Bridge support request for a review before publishing.
Private-Public-lists-15-27

26. Click on the Workflow Settings option, name your workflow, and choose Yes for both Start when items are created and modified. Then Publish your workflow.
Private-Public-lists-15-26

27. So what should happen, is when you create a new item on your locked down list, an entry should also be created on your public list. So here’s our new Locked Down list item:
Private-Public-lists-15-28

28. And the workflow will create an item on the Public List linked to the Locked down list entry. Also make sure to test editing the Locked down list and ensure that the Public list entry is edited as well.
Private-Public-lists-15-29

About Nick Hurst (84 Articles)
SharePoint and Nintex developer who strives to find easy to deploy and maintain solutions for business problems.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: