cancel
Showing results for 
Search instead for 
Did you mean: 

indexing multiple values in a keyword

Ron_Lupori
Champ on-the-rise
Champ on-the-rise

I have a document that will be imported into a workflow.  There is a keyword that usually has 1 to 3 values.  Easy just hit F6 and type in each value.  However, I do have a few departments that can have as many as 100 values for this keyword.  Can I copy and paste them in or is there a workflow action that will import all the values?


1 ACCEPTED ANSWER

Jeffrey_Seaman
Star Contributor
Star Contributor

First idea that popped into my head...

Create an ad hoc task that displays an HTML Form. The form would contain a textarea mapped to a property. The user would paste the values into this fields (the idea being there is one value per line) and submit the form.

Next you need to read those values so they can be added as individual keywords. You could maybe do this with Set Property to Expression. There is a Split function that lets you split a value (such as a property) using a delimiter. I haven't used it myself, so I'm not certain if you could pass a newline character as a delimiter. If you can, you could do this, then set the keyword from the property to add all instances.

If the expression method isn't viable, you could do something similar using a Unity script. You would read the property into a string and then call Split('\n') on it to create an array split by newline. You could then loop through the array, adding each value as a keyword to the document.

Other options could include using a IClientWorkflowScript to display a custom winform to prompt for the values instead of an HTML Form.

There's a chance there's an even easier method I'm not thinking of.

View answer in original post

4 REPLIES 4

Jeffrey_Seaman
Star Contributor
Star Contributor

First idea that popped into my head...

Create an ad hoc task that displays an HTML Form. The form would contain a textarea mapped to a property. The user would paste the values into this fields (the idea being there is one value per line) and submit the form.

Next you need to read those values so they can be added as individual keywords. You could maybe do this with Set Property to Expression. There is a Split function that lets you split a value (such as a property) using a delimiter. I haven't used it myself, so I'm not certain if you could pass a newline character as a delimiter. If you can, you could do this, then set the keyword from the property to add all instances.

If the expression method isn't viable, you could do something similar using a Unity script. You would read the property into a string and then call Split('\n') on it to create an array split by newline. You could then loop through the array, adding each value as a keyword to the document.

Other options could include using a IClientWorkflowScript to display a custom winform to prompt for the values instead of an HTML Form.

There's a chance there's an even easier method I'm not thinking of.

I'm not 100% sure that it'd work for the Split function specifically, but I have combined string properties before with newlines and the way I did it ist by having an actual newline within double-quotes, so the split function would look something like:

Split(%VpropTextArea; "

")

Thanks

Ron_Lupori
Champ on-the-rise
Champ on-the-rise

This is a good place to start.  Thanks