Timeline for Search for string and only display characters before it in Mapinfo label expressions
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 24, 2016 at 15:38 | comment | added | Peter Horsbøll Møller | Try this to figure out what character it is: select the object in the map and run these two statements via the MapBasic window which will print the ascii# of the character to the message window. The number 5 refers to the character you want to inspect: Fetch First From Selection Print Asc(Mid$(ADDRESS, 5, 1)) | |
Feb 24, 2016 at 15:25 | comment | added | GeorgeC | With {Left$(Address, InStr(1, Address, Chr$(9))-1)} nothing prints. | |
Feb 24, 2016 at 15:00 | comment | added | GeorgeC | So if the full address is "1/12 Davidson ST, PORT SMITH" it is printing "Port" but it should print 1/12. How do I tell if it is a tab? it's all in one address field as {1/12 Davidson ST, PORT SMITH} | |
Feb 24, 2016 at 14:57 | comment | added | T_Bacon | Is the perceived space in fact a tab character by any chance? Try changing this bit: InStr(1, ADDRESS, " ") to InStr(1, ADDRESS, Chr$(9)), that might fix it. | |
Feb 24, 2016 at 14:56 | comment | added | Peter Horsbøll Møller | Are you saying it's printing the characters from the right instead of the characters from the left? | |
Feb 24, 2016 at 14:38 | comment | added | GeorgeC | Thanks. It is printing Pxxx rather than 1/12. I want it to print from the first character upto the first space character. | |
Feb 24, 2016 at 13:54 | history | answered | Peter Horsbøll Møller | CC BY-SA 3.0 |