cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar

How to assign a variable to a string

Here is the example using arguments that assign a column property to a map role. 

 

col<<Set Property( "Map Role", Map Role( Shape Name Use( "filepath to data table", "column name" ) ) );

 

 

I want to get the file path automatically and fill in to the "filepath to data table" in the arguments above. 

And this is how I get the path of the file:

 

Logo_Name = Pick FIle();
Logo_Name_File = Open(Logo_Name);
LogoPath = Logo_Name_File << Get Path();

And below doesn't work for me. 

:Measure points<<Set Property( "Map Role", Map Role( Shape Name Use( LogoPath , "Name" ) ) );

 

How can I fill in the "file path to data table " with the LogoPath variable?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: How to assign a variable to a string

 See if this works for you

Logo_Name = Pick File();
Logo_Name_File = Open( Logo_Name );
LogoPath = Logo_Name_File << Get Path();
Eval(
	Substitute(
			Expr(
				:Measure points << Set Property( "Map Role", Map Role( Shape Name Use( __logop__, "Name" ) ) )
			),
		Expr( __logop__ ), logoPath
	)
);
Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: How to assign a variable to a string

 See if this works for you

Logo_Name = Pick File();
Logo_Name_File = Open( Logo_Name );
LogoPath = Logo_Name_File << Get Path();
Eval(
	Substitute(
			Expr(
				:Measure points << Set Property( "Map Role", Map Role( Shape Name Use( __logop__, "Name" ) ) )
			),
		Expr( __logop__ ), logoPath
	)
);
Jim

Re: How to assign a variable to a string

Thank you so much! It works for me !

Recommended Articles