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

Question

Question

Workflow - Split function is not recognizing empty values

asked on July 24, 2018

Hi,

I want to split an expression with a semicolumn as delimiter.

With usual expressions like "1;2;3;4", it works and it gives me 4 values with 1, 2, 3 and 4.

But if one of the values is empty , it doesn't return this empty values. For instance, with "1;;3;4", it gives me only 3 values with 1, 3 and 4 while I'm expecting 1, (empty), 3 and 4. And so, my results are all shifted

 

Do you know how to make it work

 

Thanks

0 0

Replies

replied on July 24, 2018 Show version history

It seems to be working for me.

 

Note: My test system is running Workflow 10.2.0

0 0
replied on July 24, 2018

Hi Bert,

 

it works fine with the way you provide.

 

I was using the SPLIT function from the Token Dialog :

With a token str = "1;;3;4" and another token str_split = SPLIT(%(str), ";" ), I have the following result

Thanks for your help

 

0 0
replied on July 24, 2018 Show version history

The Token Editor's Split Function is exactly what I was using to parse the single value into the multi value.

I see now that you are using the Token Calculator to create the split.  Not sure why that is dropping the blank/empty item, but you can just use the regular token editor by adding the token and then right clicking the token name and selecting "Token Editor..." and you will get the above dialog

0 0
replied on July 24, 2018

Frederic's screenshot above seems to imply he's using Token Calculator, which does exhibit the behavior he's describing. It looks to be a bug in the activity (reference ID #159689). The Token Dialog/Editor behavior is correct.

0 0
replied on July 24, 2018

Hi Miruna,

 

You're right : The problem occurs with the Token Calculator and not the Token Editor.

Sorry for the mistake

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

Sign in to reply to this post.