cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
Get the free JMP Student Edition for qualified students and instructors at degree granting institutions.
Choose Language Hide Translation Bar
View Original Published Thread

Generating graph builder graphs in a for loop

dileepkr
Level III

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 :)