You are viewing limited content. For full access, please sign in.

Question

Question

Starting Rules to act on a path, but start one level down (which has many variables)

asked on May 16, 2024

I have a workflow I want to act upon any entry that is changed within the employees’ personnel files, but I DON’T want it to act if it is an entry that is just within Personnel Files and not actually within one of the employee files within Personnel Files.

I've tried a number of things, the above being the most recent.  Anyone know how to change this so that it:

Does not start if the entry is sitting here:

Path:  Human Resources\Employee Management\Personnel Files

But does start if the entry is an employee file folder, or anywhere within one of the employee file folders, whether a subfolder or an entry:

Path:  Human Resources\Employee Management\Personnel Files\John Doe

Path:  Human Resources\Employee Management\Personnel Files\Jane Doe

0 0

Answer

APPROVED ANSWER SELECTED ANSWER
replied on May 16, 2024 Show version history

I think you might want to split up the folder case and the document case by using nested groups, so you'd have something like this:

If ANY of these conditions is true
        if ALL of these conditions is true
                User does not equal Workflow
                Entry Type equals Folder
                Entry Path starts with Human Resources\Employee Management\Personnel Files
        if ALL of these conditions is true
                User does not equal Workflow
                Entry Type does not equal Folder
                Entry Path starts with Human Resources\Employee Management\Personnel Files
                Entry Path does not equal Human Resources\Employee Management\Personnel Files

The first ALL grouping will be satisfied for any subfolder in Human Resources\Employee Management\Personnel Files.
The second ALL grouping will be satisfied for non-folder entries (documents, shortcuts) in a subfolder of Human Resources\Employee Management\Personnel Files, I believe.  If it doesn't work, you may need to use the "matches regular expression" operator to enforce that the entry path matches something like "Human Resources\Employee Management\Personnel Files\.+" I ran a quick test and it worked the way that I believe you want it to work.

1 0
replied on May 17, 2024

Thanks, Jacob.  I thought this might be the one, but after making the changes the workflow worked for the person that needed to start the Business Process on an entry, but did not start when I made a change on the employee file folder within Personnel Files.  Can you see what I might have done wrong?

On Entry Changed:

0 0
replied on May 17, 2024

I'm wondering if it has to do with the fact that the second set of conditions is indented, but I can't figure out how to get the second set to line up with the first.

0 0
replied on May 17, 2024 Show version history

Yes, a few things:

  1. The first condition group (purple text on line 1) needs to be
    If ANY of these conditions are true
  2. The two blocks of conditions both need to be inside a condition group
    If ALL of these conditions are true (so you should have purple text on lines 1, 2, and 6)
  3. The Entry : Path condition does not equal needs to be in the same block as the Entry : Type equals Document condition, not Folder

 

You can drag the condition groups around by click-and-dragging on the green arrow to the left of the condition.  This dragging also lets you change the indentation in specific locations by moving to the left or right (watch the black bar that tells you where the condition will be moved to).

1 0
replied on May 17, 2024

Ahhh... I missed that first line!  will try again!

0 0
replied on May 17, 2024 Show version history

Okay, here is what I have now and it is back to changing the metadata on entries that I don't want it to:

The entry I don't want it to change metadata on is an entry for a brand new employee that does not have a personnel folder in his name yet.

0 0
replied on May 17, 2024 Show version history

Okay, so, this seems to be working:

There is an added control in there for template, but that is because there are some other folders and entries in there that need to be skipped as well and the template control seems to be helping for that.  And I did have to make sure the "does not equal" parts were first before the "start with" paths were listed.

Thanks, Jacob!  Your idea is what seems to have made this work for me!!

2 0

Replies

replied on May 16, 2024

Hey Connie,

From what I'm seeing from your conditions, it looks like it should work correctly. What exactly is happening not as you expect?

-Kevin Roberts

0 0
replied on May 16, 2024

I haven't tested it yet, however, after filling in those starting rules today, I looked at them again after lunch and realized that workflow is likely going to see that as me saying "path starts with this" but "path does NOT start with this".  Is that not the case?  I guess I'm going to have to get back to testing.  Had to move on to something else after I set this one today.

0 0
replied on May 16, 2024 Show version history

Yep, Conflict...

In this test, I made the change on the actual Employee's folder, which is one of the next folders down within Personnel Files, but is not an entry just within Personnel Files.

0 0
replied on May 16, 2024 Show version history

Based on the original question, it sounds like your conditions work.

 

But based on that last comment, it sounds a little different.  Based on your last comment, I think this might be helpful:

 

In your example, you used these:

  • Human Resources\Employee Management\Personnel Files\John Doe
  • Human Resources\Employee Management\Personnel Files\Jane Doe

 

You've written your condition so that it works when editing these items:

  • Human Resources\Employee Management\Personnel Files\John Doe\*
  • Human Resources\Employee Management\Personnel Files\Jane Doe\*

 

But not when editing these items:

  • Human Resources\Employee Management\Personnel Files\*

 

I think there might be some confusion regarding what is including the in path of a folder when you are editing that specific folder.  In your example, if you are trying to edit the "John Doe" folder, then the path is:

  • Human Resources\Employee Management\Personnel Files

not:

  • Human Resources\Employee Management\Personnel Files\John Doe

 

So you might want your conditions to be:

  • Path Starts With:
    • Human Resources\Employee Management\Personnel Files
  • Path Does Not Equal:
    • Human Resources\Employee Management

 

With those conditions, it will match with the "John Doe" folder, or the "Jane Doe" folder (or any of their contents), but won't match with the "Personnel Files" folder.

Is that what you are going for?

2 0
replied on May 17, 2024

Hi Matthew!  Decided to try Jacob's idea first as it deals with the fact that I do want it to act in that exact location if it is a folder (and any folder's and entries below that location), but not if it is an entry; and I couldn't see how what you laid out deals with that criteria.  Might still be trying it later today, though!

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.