Copy link to clipboard
Copied
Hello All,
I have some referenced documents that I refresh when opening the parent document and I am trying to set the structured application on import.
I am using>
var importParams = GetImportDefaultParams();
i=GetPropIndex(importParams,Constants.FS_StructuredImportApplication);
importParams.propVal.ival= "myStructApp";
alert(importParams.propVal.ival);
I expect the alert to return "myStructApp" , which exists in the list of structured apps. However, my alert returns 0.
What am I doing wrong please?
thanks,
Tracey
[Thread moved to Scripting Forum by moderator]
Copy link to clipboard
Copied
Hi Tracey,
You need to use this instead:
importParams.propVal.sval= "myStructApp";
Notice is is "sval" instead of "ival".
However, I am having a problem where when I set my structured application this way, the import command still prompts me for the structured application. Obviously, I want to avoid the prompt since I am supplying the application name.
Rick
Copy link to clipboard
Copied
Hi Rick and Tracey,
I think you also need to tell FM that the document to be imported is an XML document. Set Constants.FS_ImportAsType to Constants.FV_TYPE_XML as well as defining the structured application. That should do the trick. Let me know if it works.
Jang
Copy link to clipboard
Copied
Hi Jang,
I tried that, but it didn't work. It still prompts me for the application. Thanks anyway.
Rick