02-25-2020 12:48 AM - edited 02-25-2020 12:49 AM
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.groups.fields.data.columns.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,
02-25-2020 01:30 AM
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.groups.fields.data value. It may be that the field value is missing for some reason.
03-23-2020 01:59 AM
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()
// is there anything in the fields? alert('Fields: ' + JSON.stringify(IG.formSettings.tabs.groups.fields)); // is there anything in the particular field's data? alert('field data: ' + JSON.stringify(IG.formSettings.tabs.groups.fields.data)); // ...
03-23-2020 02:37 AM
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.