Hello
I try to use the filter „is included in“ with a variable like $(vars/@zzz) that in a javascript activity is written like vars.zzz.
It works if I only have one content, but it does not work when I used several contents comma separated like
aaa,bbb,ccc
I also tried the following alternatives without success:
'aaa,bbb,ccc'
'aaa','bbb','ccc'
('aaa,bbb,ccc')
('aaa','bbb','ccc')
Any proposal for solution?
Michael
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Michael,
Yes, it is well-known limitation of the Query,Enrichment, DImension change, etc workflow activities. The wizard code generates this syntax:
IN ('v1,v2,v3')
instead of:
IN ('v1','v2','v3')
clause
given the variable value is: v1,v2,v3
There is no problem with the wizard if the values are typed, only when using variables.
So the only workaround is to replace the Query activity (or Enrichment etc) by a Query def; for instance in a webApp, the webApp var containing a list with values separated by commas, is put in the queryDef where clause as is:
"[XXX/@ID] IN (" + ctx.vars.sTypeList + ")"
Hope it could help.
Regards
J-Serge
Views
Replies
Total Likes
Hi Michael,
Yes, it is well-known limitation of the Query,Enrichment, DImension change, etc workflow activities. The wizard code generates this syntax:
IN ('v1,v2,v3')
instead of:
IN ('v1','v2','v3')
clause
given the variable value is: v1,v2,v3
There is no problem with the wizard if the values are typed, only when using variables.
So the only workaround is to replace the Query activity (or Enrichment etc) by a Query def; for instance in a webApp, the webApp var containing a list with values separated by commas, is put in the queryDef where clause as is:
"[XXX/@ID] IN (" + ctx.vars.sTypeList + ")"
Hope it could help.
Regards
J-Serge
Views
Replies
Total Likes
Thank you J-Serge,
it helped.
Michael
Views
Replies
Total Likes
Hi Jean-Serge,
What should I do if I have to extract data with this kind of filter (so I cannot use a Query activity) in a CSV file and save it in a AC SFTP folder?
Usually I would use a "Data extraction" activity but this one needs an inbound population.
Could you explain me how to do this?
Thanks in advance,
Salvatore
Views
Replies
Total Likes