GeoMedia Discussions

Search for an answer, post a question, or answer other users' questions in our GeoMedia support discussions. This discussion board is a great way to collaborate with industry peers around the world. It is intended for discussion and support of the GeoMedia Desktop and Add-on applications.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Staff
Posts: 97
Registered: ‎03-01-2017

How to reverse the concatenate function

Hi everyone

 

I was looking for the "opposite" of the CONCATENATE function in GeoMedia. 

 

Let's say we use the CONCATENATE function to create a String composed of different Names (e.g. as a resulting attribute from an analytical merge):

CONCATENATE('$';Input.Name)  

e.g.

Names_all
Anna$Mary$Sebastian$Peter$Max
Helen$Sophie$Paul$Trystan
Laura$Anna$Helen$Mary$Sophie

 

 

Can you think of an easy way to split this string again at each '$' and to save each name in an own attribute?

e.g.

Names_all Name1 Name2 Name3 Name4 Name5
Anna$Mary$Sebastian$Peter$Max Anna Mary Sebastian Peter Max
Helen$Sophie$Paul$Trystan Helen Sophie Paul Trystan -
Laura$Anna$Helen$Mary$Sophie Laura Anna Helen Mary Sophie

 

In GeoMedia, there is no function doing that (or I overlooked that one). 

If I had one single string, I could split it up using e.g. the MID() function, but I can't do this for a whole table. Or if all the names had the same length, it would be easy to create functional attributes that apply to all table entries, but this isn't the case.

 

Does anyone have an idea? Thank you in advance for any hints you can provide!

 

Regards

 

Technical Evangelist
Technical Evangelist
Posts: 341
Registered: ‎02-03-2016

Re: How to reverse the concatenate function

Have a look at the Generate Functional Attributes operator within Spatial Modeler.  Quite a few expression functions are present there beyond those available in GeoMedia, including a SPLIT function that does what you seek.

 

If you need to run this from GeoMedia, don't forget that you can craft a very simple model and execute it through the Run Spatial Model command.  I have attached an example model that you can adapt to your needs.  It does nothing more than prompt you to enter any expression, which it will attempt to add as a functional attribute.

 

If you think it warranted, you can submit an Idea to have this expression function implemented in the Functional Attribute system of GeoMedia Desktop as well.  - Hal

Staff
Posts: 97
Registered: ‎03-01-2017

Re: How to reverse the concatenate function

Hi Hal

 

Thanks a lot for your feedback and for the spatial model example. It was very useful!

 

Regards