cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
shampton82
Level VII

How to use what is returned from "get Scriptable Objects"

Hello everyone,

I was wondering how I can use what is returned from Getting a Scriptable object.

 For example, I have this code that I use with the distribution platform

biv={};
Biv1={};
Biv2={};
Biv3={};
test=0;

Biv1 = Current Report()[OutlineBox(1)] << Get Scriptable Object;
Biv2 = Current Report()[OutlineBox(2)] << Get Scriptable Object;
Biv3 = Current Report()[OutlineBox(3)] << Get Scriptable Object;


if(biv3=={Distribution[]},
		Biv = Current Report()[OutlineBox(3)] << Get Scriptable Object;
		test=3;
	,
	biv2=={Distribution[]},
		Biv = Current Report()[OutlineBox(2)] << Get Scriptable Object;
		test=2;
	,
	biv1=={Distribution[]},
		Biv = Current Report()[OutlineBox(1)] << Get Scriptable Object;
		test=1;
	,
	".";
	
);

The problem is that my If statement is not working as none of the Biv1-3 are recognizing the scripital object return value.

I'm using this to identify if there is a local data filter or column switcher and thus return the right outline box.

 

if there is no LDF or CS then i use outline box 1, if there is either a LDF or CS I use outline box 2, if there is both a LDF and a CS I use outline box 3.

 

thanks for any ideas

 

Steve

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
jthi
Super User

Re: How to use what is returned from "get Scriptable Objects"

Maybe you could try changing those to characters? Not sure how robust this would be but could work just fine:

 

 

if(char(biv3) == "Distribution[]",
...

 

-Jarmo

View solution in original post

pauldeen
Level VI

Re: How to use what is returned from "get Scriptable Objects"

If all you are after is the right outline box, then why not use the name of the outline box in your code?

SpecifcBox = Report(Biv)[OutlineBox("Name of the box you are after")]

View solution in original post

4 REPLIES 4
jthi
Super User

Re: How to use what is returned from "get Scriptable Objects"

Maybe solution from here can help Check Display box existence by JSL 

-Jarmo
shampton82
Level VII

Re: How to use what is returned from "get Scriptable Objects"

That was really good to read and I'm sure I'll use it in a different script but the help I need is not knowing if the a Outline box exists but which one is the Distribution[] one.

 

jthi
Super User

Re: How to use what is returned from "get Scriptable Objects"

Maybe you could try changing those to characters? Not sure how robust this would be but could work just fine:

 

 

if(char(biv3) == "Distribution[]",
...

 

-Jarmo
pauldeen
Level VI

Re: How to use what is returned from "get Scriptable Objects"

If all you are after is the right outline box, then why not use the name of the outline box in your code?

SpecifcBox = Report(Biv)[OutlineBox("Name of the box you are after")]