cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
dileepkr
Level III

Generating graph builder graphs in a for loop

Hi,

 

I am building a JMP app to generate multiple graphs out of an xlsx workbook, let me give a bit of background on the architecture of my code.

1. Each graph comes out of a JSL script which contains a function that takes datatable as input and returns graph builder ref as output.

2. On top level, I have a for loop on the datatables I need graphs for and I construct a function call and execute EVAL(func_call) inside the for loop.

3. I am putting each of the graph in a tabbed page in a tab box.

 

The problem I am facing is, the for loop in the main function stops execution right after the first graph is generated through EVAL(func_call) 

Could anyone please help me in understanding why for loop exits out of looping after 1st graph is generated and how to fix this?

 

Thanks in advance!

Dileep

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Generating graph builder graphs in a for loop

Is it possible that the variable used in your For() loop (i.e. I=1,i<=25,i++), is being used elsewhere in your JSL, and it is changing the index value?
Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: Generating graph builder graphs in a for loop

Is it possible that the variable used in your For() loop (i.e. I=1,i<=25,i++), is being used elsewhere in your JSL, and it is changing the index value?
Jim
dileepkr
Level III

Re: Generating graph builder graphs in a for loop

Thank you so much, that solved my problem! I will be more aware of this in future :)