cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

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

Using JMP Script to Populate a Column with Data

In the attached JMP data set there is a Character, Nominal "Cost Set" column.  It is not populated with Data yet. 

 

I have scrip that can populate all the cells with "ETC" :

For Each Row(:Cost Set  =  "ETC")

 

However what I would like to do is if the :Label column is equal to "May ACWP" I'd like to populate the :Cost Set column with "ACWP", otherwise the :Label column = "ETC"

 

Can someone help me with the script to do this?

 

Thanks!

 

 

3 ACCEPTED SOLUTIONS

Accepted Solutions
txnelson
Super User

Re: Using JMP Script to Populate a Column with Data

For Each Row(
     If( :Label == "May ACWP",
          "ACWP",
          "ECT"
     );
);

Please take the time to read the new user documentation, Discovering JMP, available under the Help pull down menu.

Jim

View solution in original post

Re: Using JMP Script to Populate a Column with Data

:Cost Set << Set Each Value( If( Contains( (:label column << Get Name ), "ACWP" ), "ACWP", "ETC" ) )

View solution in original post

dfusco923
Level III

Re: Using JMP Script to Populate a Column with Data

Hello Jim - Sorry for the delayed response thank you for providing the script for this - Dan F.

View solution in original post

4 REPLIES 4
txnelson
Super User

Re: Using JMP Script to Populate a Column with Data

For Each Row(
     If( :Label == "May ACWP",
          "ACWP",
          "ECT"
     );
);

Please take the time to read the new user documentation, Discovering JMP, available under the Help pull down menu.

Jim
dfusco923
Level III

Re: Using JMP Script to Populate a Column with Data

Hello Jim - Sorry for the delayed response thank you for providing the script for this - Dan F.

Re: Using JMP Script to Populate a Column with Data

:Cost Set << Set Each Value( If( Contains( (:label column << Get Name ), "ACWP" ), "ACWP", "ETC" ) )
dfusco923
Level III

Re: Using JMP Script to Populate a Column with Data

Hello Mark - Sorry for the delayed response thank you for providing the script for this - Dan F.

Recommended Articles