- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Check if a column contains a substring
I would like to create a new column in using jsl based on a condition that involves 2 columns. I could describe in ordinary language it as follows:
New Column( "Condition", Character, "Nominal", Formula( If( Column A contains substring "REF" then return Word(4, Column B, "_") else return Word(4, Column A, "_") ) )
could you help me with the syntax in the if statement?
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Check if a column contains a substring
If(Contains("A_B_C", "B"),
Word(1, "D_C", "_")
,
Word(2, "A_Z", "_")
)
is an example using Contains and Word. Replace hard-coded strings with your character column references
-Jarmo
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Check if a column contains a substring
If(Contains("A_B_C", "B"),
Word(1, "D_C", "_")
,
Word(2, "A_Z", "_")
)
is an example using Contains and Word. Replace hard-coded strings with your character column references
-Jarmo