M.App Enterprise Discussions

Discuss topics with other M.App Enterprise Product pioneers and experts to get the most out of it.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Frequent Contributor
Posts: 113
Registered: ‎11-29-2015

Workflow Migration ME18 to ME19: differencies

[ Edited ]

Hey everyone,

 

we have updated a project containing workflows from ME 18 to ME19. Thereby, the functionality of the preview of an image seems different.

 

The preview of the image is done through a custom.js. 

 

[...]

IG.formSettings.tabs[0].groups[1].fields[0].data.columns[0].template = columnTemplate;

[...]

 

In ME 19 the error 'Cannot read property 'columns' of undefined' (columns_error.png) is thrown whereas in ME18 the preview is working correct (preview.png).

 

Has there something changed in IG API?

Let me know if u need more information.

 

Thanks and regards,

Hella

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

Re: Workflow Migration ME18 to ME19: differencies

Hi Hella,

 

I just tried comparing several IG...js files and they're identical between 2018/2019 versions.

 

I recommend you to inspect the IG.formSettings.tabs[0].groups[1].fields[0].data value. It may be that the field value is missing for some reason.

 

 

 

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Highlighted
Frequent Contributor
Posts: 113
Registered: ‎11-29-2015

Re: Workflow Migration ME18 to ME19: differencies

[ Edited ]

Hi @jan.neumann,

 

thanks a lot!

What do you mean by inspect the value? How can I do this?

 

Regards,

Hella

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

Re: Workflow Migration ME18 to ME19: differencies

Hi Hella,

 

If it's a standalone workflow, you can use Browser Developer tools.

 

If it's only an embedded workflow, you can do that e.g. with alert() function. If you wish to see an array content in the alert function, you can utilize JSON.stringify()

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify

 

Example:

// is there anything in the fields?
alert('Fields: ' + JSON.stringify(IG.formSettings.tabs[0].groups[1].fields));

// is there anything in the particular field's data?
alert('field[0] data: ' + JSON.stringify(IG.formSettings.tabs[0].groups[1].fields[0].data));

// ...

 

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Highlighted
Staff
Posts: 1,064
Registered: ‎10-18-2015

Re: Workflow Migration ME18 to ME19: differencies

hi Hella,

 

it does not seem really using the API, there is no formsettings exposed, it looks like that call has been found by inspecting the DOM, but without using the API there is no guarantee it will be mainted across versions. I would properly rewrite it getting the specific object using one of the methods provided by the API.

 

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial