turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- graphics scripting dilemma in a report with multip...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Jun 29, 2012 8:21 PM
(699 views)

*);" and 5 was the last value of i. Any ideas on how to assign a unique script to each framebox?*

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Solution

I was able to solve this dilemma after doing some reading in the JMP 9 scripting guide. The key is to make use of the substitute function. My original code looked something like this:

**for (i=1,i<=nBy,i++, //loop through each of the by groups in the report**

** r [Frame Box(1)] << Add Graphics Script(2, HLine(HT));**

** );**

After incorportating the substitute function it looks like this:

**for (i=1,i<=nBy,i++, //loop through each of the by groups in the report**

** eval(substitute(**

** expr(r [Frame Box(1)] << Add Graphics Script(2, HLine(HT);**

** )),expr(i),i);**

** );**

** );**

So now when I review the script associated with each framebox I see HLine(HT[1]), HLine(HT[2])... instead of HLine(HT*)*

1 REPLY

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

I was able to solve this dilemma after doing some reading in the JMP 9 scripting guide. The key is to make use of the substitute function. My original code looked something like this:

**for (i=1,i<=nBy,i++, //loop through each of the by groups in the report**

** r [Frame Box(1)] << Add Graphics Script(2, HLine(HT));**

** );**

After incorportating the substitute function it looks like this:

**for (i=1,i<=nBy,i++, //loop through each of the by groups in the report**

** eval(substitute(**

** expr(r [Frame Box(1)] << Add Graphics Script(2, HLine(HT);**

** )),expr(i),i);**

** );**

** );**

So now when I review the script associated with each framebox I see HLine(HT[1]), HLine(HT[2])... instead of HLine(HT*)*