GMSC Discussions

GeoMedia Smart Client community discussion board is where you can create, contribute and share information and knowledge in regards to configuring as well as working with GeoMedia Smart Client. Find your answers, share your knowledge and help build a strong GeoMedia Smart Client community.
Showing results for 
Search instead for 
Do you mean 
Reply
Contributor
Posts: 36
Registered: ‎10-12-2015
Accepted Solution

Download FormField content

Hi there

 

I'm trying to download the content of a FormField and i can't manage to create an URL to work with IG.downloadAndSave.

This is what i managed to do and it works in a browser:

var xmltext = '<tag1>asd</tag1>'; //IG.getFieldById('TEST').getValue();

var filename = "RENNSExport";
var pom = document.createElement('a');
var bb = new Blob([xmltext], {type: 'text/xml'});


pom.setAttribute('href', window.URL.createObjectURL(bb));
pom.setAttribute('download', filename);
pom.dataset.downloadurl = ['text/xml', pom.download, pom.href].join(':');
console.log(pom); pom.click();

I would really apreciate some help!

 

Thanks a lot,

Cosmin

Technical Evangelist
Posts: 1,420
Registered: ‎09-11-2015

Re: Download FormField content

Hi Cosmin,

 

Why don't you use the standard way of downloading files?

https://community.hexagongeospatial.com/t5/Developers-Knowledge-Base/Handle-Files-in-GMSC-How-To/ta-...

 

I guess the XML data is stored in database anyway, isn't it?

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Contributor
Posts: 36
Registered: ‎10-12-2015

Re: Download FormField content

Hi there,

 

I really can't tell you why we didn't use the GMSC standard way.... Smiley Happy)

Thanks for the reminder. Of course it works fine.

 

Cosmin