0

So i have created a library in sharepoint 2016 on-prem that automatically applies values to fields based on an external list, and then modifies the file path accordingly based on these values. The field used for the lookup is employee ID, and the values returned are for whether or not the employee is currently employed, the branch number, and the district number. The workflow and a preview of the list are as follows.

Step: Step 1

If Current Item:Update Employee? equals Yes
and Current Item:A Test ID is empty value
    Set workflow status to No Update Required
    Check out item in Current Item
Else if Current Item:Update Employee? equals Yes
and Current Item:A Test ID is not empty value
    Check out item in Current Item
    Set workflow status to Identifying Employee
    Set Variable: Branch to Employee Directory:Branch Number
    Set Variable: District to Employee Directory:District Number
    Set Variable: Currently Employed? to Employee Directory:Currently Employed?
    Update item in Current Item
    Set workflow status to Employee Identified
    Check in item in Current Item with comment: Employee Identified and Document Chec...
    If Current Item:A Test Currently Employed equals Yes
            Update item in Current Item
    Else If Current Item:A Test Currently Employed equals No
            Update item in Current Item
Else If Current Item:Update Employee? equals No
    Set workflow status to No Update Required

enter image description here

The following is an image of what files will look like after they have been submitted and the workflows are complete.

enter image description here

Here is where I need help. As time goes by, employees will change branches, and will also become prior employees. If I change update employee, the same workflow that was used to submit new documents, will run on the change, repull the unformation (updating the branch and employment status) and adjust the files path accordingly. The problem is, as time goes by employees will have more and more records listed under them, which will turn this process into a job. My goal, if it is possible, is to create a site workflow (or a workflow that isn't applied to one item) in which a user can enter an employee ID, and the work flow will change the Update employee field for all entries of that employee ID from no to yes, triggering the initial workflow for update. How would I do this? Feel free to ask any questions. And, thanks in advance.

0

I discovered workflows can be run via retention settings with recurrence. This, with some if statements, enabled me to create a scheduled "task" that I can run every night.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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