Timeline for Search for string and only display characters before it in Mapinfo label expressions
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 24, 2016 at 22:53 | vote | accept | GeorgeC | ||
Feb 24, 2016 at 16:07 | comment | added | T_Bacon | @GeorgeC - Or you could do it through MapBasic as Peter has suggested in the comments for his answer. | |
Feb 24, 2016 at 16:06 | comment | added | T_Bacon | @GeorgeC - The given code should work assuming that you have selected the correct field name and the space characters are in fact space characters. It seems like either the characters are not spaces (they could be tabs, carriage returns, line feeds, etc...) or you haven't used the correct field. I'd assume that you have the correct field so it is likely that the characters are not spaces. Try copying one of the fields values into Notepad++ (or some other decent text editor) and turning on the formatting characters. You should then be able to see what characters are used where the space is. | |
Feb 24, 2016 at 15:22 | vote | accept | GeorgeC | ||
Feb 24, 2016 at 15:22 | |||||
Feb 24, 2016 at 15:22 | comment | added | GeorgeC | No worries -but how do I get to print the first characters upto the first space? | |
Feb 24, 2016 at 14:55 | comment | added | Peter Horsbøll Møller | Pick this one as he posted the answer seconds before me ;-) | |
Feb 24, 2016 at 14:42 | comment | added | GeorgeC | So whose answer should I pick? you both answered the same but neither of them get all characters from the left up to the first space. Thanks for pointing me to the reference guide. I didn't know it was there. | |
Feb 24, 2016 at 13:55 | comment | added | Peter Horsbøll Møller | You beat me to it by a few seconds, @T_Bacon :-) | |
Feb 24, 2016 at 13:54 | history | answered | T_Bacon | CC BY-SA 3.0 |