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

New column from existing one with dashes and periods

Hi, I am new to programming in general and am having trouble with this one column in JMP. I want to create a new column from one that is autogenerated, but my if/ then statements aren't working. I think its because sometimes there are words and spaces within the strings of numbers and often dashes and periods. I am looking for only one number within a string of numbers. Sometimes it will be at the front, sometimes sandwiched in the middle. I want to find the strings with the number 399 in there somewhere, all others will be standard. Can someone help? Example:

documentrequisition
100-399-214.2399
399-214.2-199399
100-100-344standard
214.2-100 and 598-100-399399
1 REPLY 1
jthi
Super User

Re: New column from existing one with dashes and periods

You can for example use If + Contains in a Formula

If(Contains(:document, "399"),
	"399"
,
	"Standard"
);

 

-Jarmo

Recommended Articles