TypeError in the new Code node

Helloo, i am using the new code node, and i have a question about the function itemMatching.

I have write this little function,

var jriati = $('Set value for Jira').itemMatching('Ticket Last comment');

return jriati;

The argument inside the () is the name of the field item, but it return me this error.

ERROR: Cannot read properties of undefined (reading 'pairedItem') [line 1]
TypeError

My goal is to take the value of a column inside an item
What i have to write, the item field name or the value?
thanks!!

Hey @Gabriele_Bracciali,

It could be that there is no paired item to match against. Do you have a screenshot of your workflow so we can the amount of items coming in and what the workflow looks like?

Hey @Jon , thanks for reply.


Screenshot 2022-10-28 at 10.18.09

Hey @Gabriele_Bracciali,

I have just had a quick look at the doc page and it looks like it doesn’t use a name it is expecting an index of the item.

Using $('Set value for Jira').itemMatching(0) would get you the fields from the first index so you could have something like this…

2 Likes

Thanks for helping, now it’s working like aspect.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.