0

I am trying to interleave 2 fields in zapier code, I have searched for a few hours trying to find a similar question with the answer and the best result i had was with;

Most pythonic way to interleave two strings

so from that answer, I have put the code in like this;

Image

But it keeps coming up with an error or saying that 'the code is good but no output';

Image

I have very limited knowledge of coding but the Output I'm after is, in simple forms, to have the quantities next to the name of our products;

Quantity= 1,2,3,4

Product= A,B,C,D

Ideal Output= 1 x A, 2 x B, 3 x C, 4 x D

The input fields have no spaces in, the Products and the Quantities are also separated by Comma's

Can anyone help with a solution to this problem?

Community
  • 1
  • 1
Sdavis
  • 1
  • 1

1 Answers1

0

You literally have to define an output variable which must be a JSON object or array. It will serve as an input in any Zap action you define afterwards.

E.g. at the end of your code you can write:

output = "".join(zip(l1,l2))

or

return "".join(zip(l1,l2))

See the code examples section at Zapier's docs.