/ All posts
- M9 - StringJoinTokens funtion to achieve word wrap
I'm trying to work out a way to put a list of point IDs in a text control in a layout in M8. Lists can vary from a few chracters to maybe 100 or so and reference which points are on the particular layout page. Before attempting to write a script that maybe aggregates IDs into arrays, etc, I thought I'd checkout what M9 had to offer that would no doubt be simpler and quicker.
I was pleased to find the StringJoinTokens function:
"Passing such personalized separators makes it possible to inject tokens that can be replaced by newline or other characters in output results."
The function aggregates the IDs into individual records for each named Layout (existing in M8 - table exported to M9) but I'm not sure how I could use it to insert newlines every given number of characters.
Or, maybe there is a better way to achieve what I want (?).
Any thoughts or suggestions?
Ok, not getting any takers here (sound of crickets in the night).
I've solved the word wrap issue with a script in M8 so perhaps If anyone can help with how to go about writing query for M8 that would concatenate the aggregated query output similar to StringJoinTokens in M9 (example attached).
Or, If not, is there a way to run a query in M9 from M8 so that the results show up in a linked table in 8?
Help greatly appreciated!
TreeIDs per page example_M9.map
Yes, ODBC - I've been using that but in just the way you say but it would be great to not have to open the M9 project to run the update query.
I've looked around other SQL forums and it appears that it is quite a complex task to aggregate data the way the StringJoinTokens function does. Some SQL flavours seem to have special xml output tools, etc.
I'll go with the 2 project approach (8 & 9) for now and maybe attempt to move the whole lot into 9 when I get more au fait with its layout features.