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

Question

Question

Non-Script Workflow Method for Retrieving Available List Values

asked on April 7, 2014

I have a customer who has a unique code at the end of each item in a Project Type list that relates to the beginning portion of the related Project #.  Using Workflow, they are wanting to use the Project # field to automatically fill in the non-dynamic Project Type list field based on these two portions of the fields matching. Another catch is that their Project Type list is ever growing and they do not want to update Workflow every time they add a new Project Type to the drop-down list.  

 

Thus for a document with a Project # of "ABC-123-456" I would want to be able to assign the second option below from the drop-down list to the template without having to hard code in a path for each of the options.

  1. Construction XYZ
  2. Mechanical ABC
  3. Demolition QRS

 

I know there is an activity to add items to a list field, but is there an activity to retrieve the available items from a list field?  If not, using built in activities but not script activities (customer does not want any custom scripting), does anyone know how to assign a value from a list field based on a partial match from another field?  I'm afraid this is not currently possible without scripting but I am hoping someone has found a way to do this.

0 0

Replies

replied on April 7, 2014

You could get the list of values with a Query Data activity against the LF SQL tables. What value would you set if the partial value from the other field matches 2 or more values in the list?

 

One thing to consider is that if you do publish a data source for the LF SQL tables to use with Query Data, then anybody with rights to design workflows can use it to read data directly from SQL. A script would be easier to secure since you could remove most people's rights to view that workflow.

0 0
replied on April 7, 2014

They've guaranteed there would be no to items in the list that had the same final 3 capitalized characters, as they require them to be unique for their internal processes.  I've still planned for that just in case, so if two came back then I would have it go down an Error path in the workflow and force them to pick the correct value.

 

I agree with you about querying the LF SQL tables directly though.  This is a small company but it still opens a large vulnerability as they are also storing HR & Finance documents in the same repository.  I will stay away from creating an LF SQL data source for that reason but appreciate the idea.

 

I was hoping there was a built-in activity that would return the available values or a way to assign a value from a drop-down based on a partial match.  If not, is there a chance of a future activity that could retrieve these available drop-down values?  That might fall in line with someone one else's request on Answers to have an activity that could remove a value from a drop-downs available options.

0 0
replied on April 7, 2014

There is no activity like that. And it's pretty unlikely we'll make it given the limitations you have on it. We'd have to figure out how to handle duplicates and all possible operators for finding matches and so on since none of those limitations would be acceptable for an "official" activity. It's a perfect case for a custom activity, but I'm guessing that's not an option either?

 

Custom Query with a WHERE clause to match the string you wanted would've been my suggestion. But if you can't open up the data source to users and you're not allowed to use scripts, you're pretty much out of luck.

 

As a wild idea, you could install a second WF server on a separate machine that runs this one workflow and has tighter security for who can access it and publish workflows to it.
 

0 0
replied on April 8, 2014

I figured it was a long shot but I was hoping since y'all had added an activity to add list values, you also might add one to return list values as a multi-value token.  With that token there are a ton of uses besides mine, such as verifying a value hasn't already been added to a list before attempting to use the Append List Field Choices activity or, if  in the future you provide a Remove List Field Choices activity, to verify the value exists before attempting to remove it.

 

Thanks for the suggestions.  I think I may switch it over to a dynamic drop-down stored in a separate db on the LF SQL server and then I can query the table holding those values without creating a data source that queries the LF SQL db's directly.  Once again, thanks for the help.

0 0
replied on April 8, 2014

Append List Choices checks for duplicates, so you don't have to check yourself.

 

The main reason an activity to retrieve all list values is unlikely is that most use cases are like yours, where you don't need the whole list, you need one value. So retrieving a potentially large list (I've seen some lists with 50,000 values out there) to make it available to a For Each Value activity for iterating through the values looking for a match is inefficient. A SQL query is way faster. We are currently looking into adding more fine-grained security to data sources and scripts.

0 0
replied on April 8, 2014

I agree, iterating through a large list is time consuming when it usually isn't necessary.  I'm excited to see what options y'all come up with as I continue to try to both enhance and streamline my workflows.

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

Sign in to reply to this post.