- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Left function behavior
I'm having an odd behavior with Left(). Consider the following:
Left( "A", 2, " ")
I anticipate the result will be "A " (i.e. padded on the right with a space). And indeed this is what I get.
However, When I use the same expression in a column formula like this:
Left( :Input, 2, " ")
and I have "A" as the value in Input, I am just getting "A" in the result column (i.e. no right space).
Am I missing something?
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Left function behavior
Removing trailing spaces can't be turned off. JMP removes the trailing spaces so other code that does grouping can run faster and not make two groups that seem to have the same identifier.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Left function behavior
I think you are hitting a rule that trims trailing spaces from character data in data tables. This works:
Append a non-space after the left function's result
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Left function behavior
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Left function behavior
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Left function behavior
Removing trailing spaces can't be turned off. JMP removes the trailing spaces so other code that does grouping can run faster and not make two groups that seem to have the same identifier.