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

Question

Question

Action upon multiple value list value being deleted.

asked on January 19, 2018

I have a workflow that creates a shortcut in folders for every choice made in a multiple value list field.  Works great, but the workflow doesn't know to remove shortcuts if one of the choices in the field is removed.

Example case: 

  • Advertising was done in (1) a newspaper, (2) facebook, and (3) website. 
  • All three choices are made in the multi-value field on the record's template.
  • Once saved, three shortcuts are created (by WF) in corresponding advertising folders.
  • Now, the user realizes they aren't advertising on facebook.  They reopen the document and remove the choice of facebook off that multi-value field.

 

Unfortunately, when they remove that one, the workflow does not remove the shortcut in the facebook folder.  Is there a way to accomplish this?

0 0

Replies

replied on January 19, 2018

To clarify, I'm wondering if I can set Workflow to monitor a field like this and remove a corresponding shortcut if one of a multi-value field is removed.

0 0
replied on January 19, 2018

A field rule won't monitor that specific field.  When I need to do something like that, I have the rule for "document changes" and then I put a conditional decision at the very top of my workflow that say if it was started by rule x then do these actions.  In this case maybe count the shortcuts and the field values.  Then the last step in the conditional is to stop the workflow so it doesn't do any of the other activities.

 

1 0
replied on January 19, 2018

Do you have a rule that triggers the workflow when the document changes?

 

Two options I can think of off the top of my head would be to have something at the top of the workflow that finds all the shortcuts to the document and counts them.  Then retrieve the field values and count them.  If they don’t match, delete all shortcuts and remake them.  That in your example should give you 2 shortcuts instead of 3.  Provided of course that there is no other workflow or reason that there would be shortcuts to this document outside of the advertising folders.

 

The other option could be to have a part of the workflow that has a token where you generate the “expected path” of all the shortcuts.  Then retrieve the shortcuts.  Compare them to the expected path token and if a shortcut path in not in the expected path token then delete it.

 

**Side note on the starting rules – one thing I have discovered is that if I use the X next to the metadata field value to delete the information, workflow treats it as a field change.  But if you use the cursor and backspace to delete the text, it is considered a field delete.

0 0
replied on January 19, 2018

Not to side track this even more, but I can't reproduce the behavior in your side note. Deleting or blanking out a value in a multi-value field generates a "template field set" entry change event. If the value removed is the only value in the multi-value field, it also generates an additional "template field deleted" entry change event.

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

Sign in to reply to this post.