Skip to main content
Best answer

Jotform to Monday, isolate numbers from Configurable List widget


Forum|alt.badge.img

Hi there

 

I have a Configurable List widget in my Jotform, and would like Zapier to just pull the ages of the child through to a column in Monday:

 

 

I’ve been playing around with different codes but ultimately, it’s not working. What’s the best way to do this, especially when each form submission may have a different amount of ‘numbers’ (ie. someone might have 2 kids, or 5 kids etc).

 

I’d then like for the total number of numbers (ie. 5 if there are 5 children) to come through to a different column on Monday. 

 

Thanks for your help in advance, I am stuck!

Best answer by Troy TessaloneBest answer by Troy Tessalone

@ellieroberts 

Did you republish the Zap after updating the Zap Code step?

Did you try testing after the Zap was republished?

View original
Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

24 replies

Troy Tessalone
Forum|alt.badge.img+14

Hi @ellieroberts 

For us to have more info, post screenshots with how the data is returned from the Jotform Zap trigger step.


Forum|alt.badge.img
  • Author
  • Beginner
  • 33 replies
  • August 9, 2024

Thanks for your response @Troy Tessalone 

 

This is how it appears - it is in one strand:

 

 

Eg: [{"Full name of child":"Ellie","Age":"1"},{"Full name of child":"Ellie","Age":"3"},{"Full name of child":"E","Age":"6"}]


Troy Tessalone
Forum|alt.badge.img+14

@ellieroberts

The data is returned as raw JSON.

You’ll have to use Code to convert the data into variables that can be mapped.

 

let RAW = JSON.parse(inputData.RAW);

output = [{RAW}];

 

 


Forum|alt.badge.img
  • Author
  • Beginner
  • 33 replies
  • August 9, 2024

Sorry @Troy Tessalone for the dumb questions. Do I enter it like this? 

 

 

I get this error:

 


Troy Tessalone
Forum|alt.badge.img+14

@ellieroberts 

Change this to just: RAW

 


Forum|alt.badge.img
  • Author
  • Beginner
  • 33 replies
  • August 9, 2024

Thanks @Troy Tessalone It came through to Monday, but the column that I have mapped to in Monday is still empty. I then got this error email from Zapier: 

 

 

 

 


Troy Tessalone
Forum|alt.badge.img+14

@ellieroberts

What type of field is each in Monday?

Can you show screenshots with how your Zap steps are configured in EDIT mode so we can see the field types/descriptions?

Would need to see the DATA IN/OUT for each Zap step from the Zap Runs: https://zapier.com/app/history/


Forum|alt.badge.img
  • Author
  • Beginner
  • 33 replies
  • August 9, 2024

Many thanks @Troy Tessalone - really appreciate your help!

  1. They are currently all text columns in Monday.com
  2. /3. See below, hopefully this helps but let me know if you need anything else!

 


Troy Tessalone
Forum|alt.badge.img+14

@ellieroberts

This shows the input of the Code step as plain text not raw JSON, thus why the Code encountered an error because there was no JSON to parse.

 

Different code logic would need to be used if the Code step input value will be plain text.

 

Try this code:

let TXT = inputData.TXT || "";

let ChildAges = [];
let ChildNames = [];

if (TXT.includes("Age")) {
  TXT = TXT.replace(/\n/g,"|").replace(/\|\|/g,"|"); 
  const result = extractChildData(TXT);
}

// Function to process the input string and extract child ages and names
function extractChildData(input) {
    const parts = input.split('|');

    for (let i = 0; i < parts.length; i += 2) {
        const agePart = parts[i];
        const namePart = parts[i + 1];

        const age = parseInt(agePart.split(': ')[1]);
        const name = namePart.split(': ')[1];

        ChildAges.push(age);
        ChildNames.push(name);
    }

    return { ChildAges, ChildNames };
}

ChildAges = ChildAges.join(", ");
ChildNames = ChildNames.join(", ");

output = [{ChildAges, ChildNames}];

 


Forum|alt.badge.img
  • Author
  • Beginner
  • 33 replies
  • August 9, 2024

@Troy Tessalone Still having troubles, unfortunately!


Troy Tessalone
Forum|alt.badge.img+14

@ellieroberts 

Need to see screenshots of the DATA IN/OUT from the Zap Run to have context about the error.


Forum|alt.badge.img
  • Author
  • Beginner
  • 33 replies
  • August 12, 2024

@Troy Tessalone 

 


Troy Tessalone
Forum|alt.badge.img+14

@ellieroberts 

The Code step is still using the old JavaScript to parse JSON.

See above in the thread for the new JavaScript to use to parse the TEXT.

 

 


Forum|alt.badge.img
  • Author
  • Beginner
  • 33 replies
  • August 12, 2024

Thanks so much @Troy Tessalone, really appreciate your help. That seems to be working better now but it still isn’t coming through to Monday. 

 

 

 


Troy Tessalone
Forum|alt.badge.img+14

@ellieroberts 

Check the DATA OUT to see the returned Monday Item ID.

In Monday, click on a Monday Item to see the Item ID in the browser URL.

Then you can use the Monday Item ID from the Zap step DATA OUT to adjust the browser URL to go directly to the Monday Item ID that was tested with to make sure you are looking at the correct Monday Item ID.

 


Forum|alt.badge.img
  • Author
  • Beginner
  • 33 replies
  • August 12, 2024

Thanks @Troy Tessalone - it’s definitely the right item, everything comes through except the ages. When I run a test on Zapier, it works great but doesn’t when I submit a form.

 

 


Troy Tessalone
Forum|alt.badge.img+14

@ellieroberts 

Check if there are other Zaps or native Monday Automations that are overwriting the column value after the Monday Item is created.


Forum|alt.badge.img
  • Author
  • Beginner
  • 33 replies
  • August 12, 2024

@Troy Tessalone none that I can see. It looks like the code step is breaking down again. Sorry for being so annoying!

 

 


Troy Tessalone
Forum|alt.badge.img+14

@ellieroberts 

In order to have context about the Zap Code step error, we need to see screenshots of the DATA OUT from Step 1 and ALL the DATA IN for Zap step 2.


Forum|alt.badge.img
  • Author
  • Beginner
  • 33 replies
  • August 12, 2024

@Troy Tessalone  

 


Troy Tessalone
Forum|alt.badge.img+14

@ellieroberts 

Based on the DATA IN, the Code step is using the OLD JavaScript code.

Make sure to update the Zap Code step to use the NEW JavaScript code.

 

 

let TXT = inputData.TXT || "";

let ChildAges = [];
let ChildNames = [];

if (TXT.includes("Age")) {
  TXT = TXT.replace(/\n/g,"|").replace(/\|\|/g,"|"); 
  const result = extractChildData(TXT);
}

// Function to process the input string and extract child ages and names
function extractChildData(input) {
    const parts = input.split('|');

    for (let i = 0; i < parts.length; i += 2) {
        const agePart = parts[i];
        const namePart = parts[i + 1];

        const age = parseInt(agePart.split(': ')[1]);
        const name = namePart.split(': ')[1];

        ChildAges.push(age);
        ChildNames.push(name);
    }

    return { ChildAges, ChildNames };
}

ChildAges = ChildAges.join(", ");
ChildNames = ChildNames.join(", ");

output = [{ChildAges, ChildNames}];

 


Forum|alt.badge.img
  • Author
  • Beginner
  • 33 replies
  • August 12, 2024

Sorry @Troy Tessalone - am I not entering the code properly?

 

 


Troy Tessalone
Forum|alt.badge.img+14
  • Zapier Expert
  • 30982 replies
  • Answer
  • August 12, 2024

@ellieroberts 

Did you republish the Zap after updating the Zap Code step?

Did you try testing after the Zap was republished?


Forum|alt.badge.img
  • Author
  • Beginner
  • 33 replies
  • August 12, 2024

Oh my goodness, it worked! Thank you so so much, really appreciate your help @Troy Tessalone