Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Concat: delimit Fields like 'X', 'Y', 'Z' for Set Analysis

Hey all

I would have a field with Articlenumber. I would like to concat those articlenumbers according to my current selection in order to use it in Set Analysis. For this purpose i'll have to delimit the fields like  'X', 'Y', 'Z'. Any idea how to go about this?

all the best

Sebastian

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Its a little easier if you put it in a variable, but you should be able to do this:

=sum({<[Article Number]={"$(=chr(39) & Concat([Article Number], chr(39) & ',' & chr(39)) & chr(39))"}>} ....

with the variable defined above:

=sum({<[Article Number]={"$(vConcatArticle)"}>} ....

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

6 Replies
ashwanin
Specialist
Specialist

Hi Sebastian,

Can you please provide a sample to understand your exact requirement?

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

In script:

concatArticle:

LOAD chr(39) & Concat(ArticleNumber, chr(39) & ',' & chr(39)) & chr(39) As concatArticle

Resident Data

Where ......(some conditions if required)

Let vConcatArticle = Peek('concatArticle');

Drop Table concatArticle;

or from front end:

Set vConcatArticle = =chr(39) & Concat(ArticleNumber, chr(39) & ',' & chr(39)) & chr(39)

(double == sign is not a typo)

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi Jonathan,

Your solution is delivering exactly what i want if i put the term =chr(39) & Concat([Article Number], chr(39) & ',' & chr(39)) & chr(39) into a textbox.

Unfortunately, if I want it to use it in SetAnalysis it won't work:

=sum({<[Article Number]={chr(39) & Concat([Article Number], chr(39) & ',' & chr(39)) & chr(39)}>}[MSEG.Menge Wareneingang Gutteile])

I tried it like this, because i didn't exactly understand your front end solution with the Set vConcatArticle...

Could you maybe rephrase how to first create the variable and then use it in the Set?

Thank you very much!

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Its a little easier if you put it in a variable, but you should be able to do this:

=sum({<[Article Number]={"$(=chr(39) & Concat([Article Number], chr(39) & ',' & chr(39)) & chr(39))"}>} ....

with the variable defined above:

=sum({<[Article Number]={"$(vConcatArticle)"}>} ....

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Sebastian Schuler wrote:

I tried it like this, because i didn't exactly understand your front end solution with the Set vConcatArticle...

I always define variables like that in my load script. Use the Set expression as a line in your load script exactly like this:

Set vConcatArticle = =chr(39) & Concat(ArticleNumber, chr(39) & ',' & chr(39)) & chr(39);


Or define it in the variable overview as

=chr(39) & Concat(ArticleNumber, chr(39) & ',' & chr(39)) & chr(39)

(the leading = is important)


HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi Jonathan

Finally i got it. Your Solution was almost right. I just had to leave away the quotation marks. When i wrote it like this, it worked:

=sum({<[Article Number]={$(vConcatArticle)}>}

Thanks again!!

cheers

Sebastian