2

I am wondering if there is a way to get the data that is entered into specify your own value which is a part of Content type, new folder/new item form I have set up for a document library.

This section in the image is for when there is a new client that is not already in our drop down menu.

I am curious if there is a way to pull every 7 days (for example) all data that is entered into that field and have it send me an email or a list of some kind. To help reduce the steps I take currently to make sure this list (drop down) is up to date.

See image: enter image description here

2 Answers 2

2

You can use REST API to loop through all the items in the list. Beginner overview here: https://weblogs.asp.net/ricardoperes/looping-through-list-items-in-sharepoint-2013

A few notes for building your API call:

You'll end up with a REST API URL that looks something like this: http://server/site/_api/web/lists/getbytitle('yourlist')/items?$select=column&$filter=column ne 'existing value 1' AND column ne 'existing value 2' AND column ne 'existing value 3'&$orderby=column asc

Run the HTTP GET operation in your workflow to pull that data into a dictionary, then loop through the items to eliminate duplicates (save the previous value in a string and only add the new value to your report if it's different).

Lastly, send yourself an e-mail with that information, tell the workflow to pause for 6 days, 23 hours, and 55 minutes, and then loop back to the top. The whole thing will look something like this:

enter image description here

Hope this helps!

1
  1. If you need "a way to pull every 7 days" something within a SharePoint environment - the right solution is a timer job and not a workflow (although it is also possible to implement this as a workflow)

  2. It is indeed quite easy to implement such functionality - just get all the values since the last timer job run and compare it with a "field definition" (actually with all the "Choices" within a SPFieldChoice object)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.