cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

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