- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
JMP Script: Message with if condition
Hi all,
I am trying to make a control chart based on a condition.
However, I received a message when the condition Eval(Y) is not present in the without_limits list (else condition).
Here is my program:
If (Contains(without_limits,Eval(Y)),
graph=Control Chart Builder(
Variables(
Subgroup( :X ),
Y( Eval(Y) ),
Phase(:"Version")
)
),
graph = RAW_DATA_TABLE <<
Control Chart Builder(
Size( 534, 450 ),
Show Two Shewhart Charts( 0 ),
Show Control Panel( 0 ),
Sort by Row Order( 1 ),
Show Limit Summaries( 0 ),
Variables( Y( Eval(Y) ),Subgroup( :X ), Phase(:"Version")),
Get Limits(LIMIT_TABLE),
),
N = N Items( phaseLevels );
// On met en forme les lignes
For( i = 1, i <= N Items( phaseLevels ), i++,
graph << SendToReport(
Dispatch(
{},
"Control Chart Builder",
OutlineBox,
{Set Title( "Représentation graphique" )},
FrameBox( 2 ),
{
DispatchSeg( Line Seg( Eval(3*i+N-2) ), {Line Color( "Medium Light Green" ),Line Style( "Dotted" ), Line Width( 1.5 )} ),
DispatchSeg( Line Seg( Eval(3*i+1+N-2) ), {Line Color( "Medium Light Orange" ), Line Style( "Dotted" ), Line Width( 2.5 )}),
DispatchSeg( Line Seg( Eval(3*i+2+N-2) ), {Line Color( "Medium Light Red" ), Line Style( "Dotted" ), Line Width( 2.5 )})
}
)
)
)
)
Here is the message I get:
"Check that the script does not contain an assignment with a single = sign, where an equality test with two == signs is expected. The expression is: ..."
However after clicking on the continue button it is working...
Any idea to help me understand this message?
Sebastien
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: JMP Script: Message with if condition
It could be due to both of these
Should the N Items be already outside if statement?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: JMP Script: Message with if condition
Make sure your , are in correct locations
If(Contains(without_limits, Eval(Y)),
graph = Control Chart Builder(Variables(Subgroup(:X), Y(Eval(Y)), Phase(:"Version")))
,
graph = RAW_DATA_TABLE << Control Chart Builder(
Size(534, 450),
Show Two Shewhart Charts(0),
Show Control Panel(0),
Sort by Row Order(1),
Show Limit Summaries(0),
Variables(Y(Eval(Y)), Subgroup(:X), Phase(:"Version")),
Get Limits(LIMIT_TABLE),
)
, N = N Items(phaseLevels);
For(i = 1, i <= N Items(phaseLevels), i++,
graph << SendToReport(Dispatch(
{},
"Control Chart Builder",
OutlineBox,
{Set Title("Représentation graphique")},
FrameBox(2),
{DispatchSeg(Line Seg(Eval(3 * i + N - 2)), {Line Color("Medium Light Green"), Line Style("Dotted"), Line Width(1.5)}),
DispatchSeg(Line Seg(Eval(3 * i + 1 + N - 2)), {Line Color("Medium Light Orange"), Line Style("Dotted"), Line Width(2.5)}),
DispatchSeg(Line Seg(Eval(3 * i + 2 + N - 2)), {Line Color("Medium Light Red"), Line Style("Dotted"), Line Width(2.5)})}
))
);
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: JMP Script: Message with if condition
I had a look and all the "," seem ok.
Couldn't it come from hte , in red below?
...Get Limits(LIMIT_TABLE),
)
, N = N Items(phaseLevels);...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: JMP Script: Message with if condition
It could be due to both of these
Should the N Items be already outside if statement?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: JMP Script: Message with if condition
Right!
I wasn't looking at this ")"
Now it works well!
thank you