Skip to main content
Known Participant
March 17, 2015
Question

Trouble Setting the structured app on import - FS_StructuredImportApplication

  • March 17, 2015
  • 1 reply
  • 513 views

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]

This topic has been closed for replies.

1 reply

frameexpert
Community Expert
Community Expert
August 1, 2016

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

www.frameexpert.com
4everJang
Legend
August 1, 2016

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

frameexpert
Community Expert
Community Expert
August 1, 2016

Hi Jang,

I tried that, but it didn't work. It still prompts me for the application. Thanks anyway.

Rick

www.frameexpert.com