Skip to main content

Hello,

today I would like to aks a question about workflow and how to set a choice column of an item correctly using the workflow.

The situation is that I have a document collection. This collection was build by a service provider using a software to migrate a lotus notes database file. One column - lets call it 'oldCategories' -  in the list contains one or more strings separated by comma which are the names of categories where the document could be found in LN. Now have added a new column 'newCategories' to the list of type "Choice" with the option to choose multiple values. I also defined a selection list for that column so, if a user creates a new document he can select the values using checkboxes.

For the already existing records I want to use a workflow to set these values of that 'newCategories' column depending on the values that I can read out of the 'OldCategories' column. I got to the point that I can separate the single strings I read out of that column and cut them to the necessary information so that the strings are matching at least one of the values that are selectable using the checkboxes.

Now I got stuck on the question how to fill in the strings I found into the 'newCategories' column correctly. So that if someone wants to change that column later he can select or deselect the checkboxes that are offered in the form.

Have I first to populate a collection variable and after that using 'update item' action or have I to update that column separately for every new value ? If I have to do that separately how do I prevent to loose the already existing values?

Thanks for your answers in advance.

Hi ‌,

Just a question to understand your situation better:

Could it be that the column 'oldCategories' contains categories which are not available as options in the column 'newCategories'?

Cheers,

Rick


Btw, the following post might already be useful for you: https://community.nintex.com/thread/1105

The separator is: ;# (semicolon hash)


Good day Martin,

This is a nice problem laugh.png

If you look at the way a Checkbox stores the values you will notice that it also stores the data as ,-delimited.

Below is a list that I have with checkboxes.  I then log this value in history

200812_1 Checkboxes.PNG

In step in I display the value and then I split is with a regular expression and the add it to a collection.

200813_2 metal prices.PNG

You can see that the initial checkbox saves it with ",".  So I think if you can replace the ";" with a "," and then just update the Checkbox value with this, it will write what was in the old values into the new values checkbox.

Let me know if I need to expand more.

Kind Regards,


Hi ‌,

Could you please test if this is really the case for you. In my 2010 environment ;# is the seperator.

Cheers,

Rick


No, this case could not occur. I thought about and checked that.


Thanks for your answers. Now I will try out and answer if I got the goal.


I meant as separator when using the 'Update item' action to update the column 'newCategories'.

Screenshot as example (categories 'AAA', 'CCC' and 'DDD')


Hi Rick,

That is strange because this is the action steps logged in history straight after the assignment and I also have SharePoint 2010. 

200867_WorkFlow Metal.PNG

In the log in History, I only have this for my first line and you can see from my previous post that this is the Check box.

Metal - {ItemProperty:Metal}  and then this is the result   The first highlighted line.   I use this same values as the Input for the

200868_2 metal prices.PNG

Either which way Martin Niewerth‌, you can also log your result to Log in History action and then just see what is written away.  If it is ;# as the separator then that is what you will replace with the Regular Expression Action.


Thanks Rick Bakker, I did a test and that works exactly as your example shows.


Reply