I have a humdinger of a request I need to determine if it’s possible and/or more trouble than it’s worth if somebody wants to chime in
here’s the scenario
I need a field in an SP list to be built off 3 conditions
- Vendor name, which is typed in manually or by choice
- Current Year
- Number of documents we have done for that vendor in the current year
2 and 3 need to be calculated if possible. Â The name is then built based on those 3 criteria
number 3 is where I see a lot of difficulty
You could use a workflow that fires on item added. It will make a REST call to get the items matching your vendor and filtered for the current year. The count of the items returned will be your #3. Save that into a column for your document in whatever format you want it.
Edit: You’ll want to track the “count” in a column, too. If you were to delete a document, the item count won’t be sufficient and you’ll get duplicates. If you keep the count in a column, each new item will use the REST call to get the appropriate items sorted by the count column. You will take the highest and increment it.