I am looking for a solution workflow to update fields when it matches two different columns.
Below is my scenario:
I have a list with fields: full name and id number for which each new items goes through approval. Once approved the status field is set as 1. When a new item is added, and if it matches both full name and id number, then the workflow should automatically update each items status field with 2 and so forth until it reaches 5.
Basically, this is a merit system. It has a merit column and the type of merit column. There is 5 different merits types, three based on departments: HR, IT, and BD, and two after all three sector merits are received: Professional, and Expert. When the merit column is either HR, IT, or BD, the merit column should display either of the selected merit types. The merit column must append new merit types received. Once all 3 sectoral merit types are received, on the 4th update, the merit column should say Professional, and on the 5th update, the merit column should say Expert.
Any help is appreciated!
so you need first query the list for already existing items for a given combination of fullname and ID. store the result set into a collection
examine either number of returned elements or returned values itself to identify next value of 'merit'.
you can simply identify by number of returned items - if they're returned 4 elements, you know you should update actual 'merit' value to 4.
or you can check exact returned values, so when you identify latest achieved 'merit' is eg IT, you konw actual value of 'merit' to update with shoyuld be BD.
once you identified actual 'merit' value, use one of update item/update multiple items/set field value to update respective list item(s)
Thank you emha,
How would you examine the returned elements? The merit given are randon (some may receive HR, IT, or BD at any given time). Only the 4th merit is always Professional, and 5th merit is always Expert. I would not mind creating a seperate list for this.
unfortunatelly I do not know enough details to provide exact answer on this.
if you would need to be very exact and prevent somebody picks/achieves profesional or expert level by a (
cheat) mistake, you will have to check for exact expertise alread achieved.
if it's ensured that it's not possible to pick/achieve profesional level before having achieved first three levels (in whatever order) and not possible to pick/achieve expert before having achieved profesional, then check on number of returned items might be sufficient.
I will have to get exact merit awarded somehow. Most likely 99% of the time the department personnel will NOT pick the same person twice or more. But, we cannot work for 99%, we have to have a solution that works 100%.