Dr. Zathras Posted April 20, 2009 Posted April 20, 2009 I know from a post last month that scripting SC requires the use of External Functions, but I would really appreciate a little more help to get me started. Specifically, I need to write a script which when run copies the contents of a SC web viewer to another SC web viewer in the same record, overwriting anything already there if necessary. Any information to point me in the right direction would be great. Thanks. Colin
Fitch Posted April 20, 2009 Posted April 20, 2009 The SuperContainer server can be used without the companion plugin. For this particular function the plugin isn't required. Not sure exactly what you're trying to accomplish, but I believe you could simply use the Set Web Viewer script step to specify a URL, e.g. "http://localhost:8020/SuperContainer/Files/" & $newLocation Does that make sense?
Dr. Zathras Posted April 21, 2009 Author Posted April 21, 2009 Thank you very much for the reply, but I probably didn't give sufficient background to properly explain the problem. We have a database with an IWP interface for our campus users, while we use FMP 9 clients in the admin office. Web users upload a number of separate attachments via SuperContainer which we open and check at our end. If the attachment is approved we want to be able to copy it to another SuperContainer by clicking a button; if it is not approved the administrator puts a different file into the second SuperContainer while keeping the original upload in the first SuperContainer. I interpreted your suggestion as this script step: Set Web Viewer [Object Name: "http://localhost:8020/SuperContainer/Files/" & Subrecipient_Agreement::New_Sub_Record_Number & "/reports_web"] Action: Go to URL: "http://localhost:8020/SuperContainer/Files/" & Subrecipient_Agreement::New_Sub_Record_Number & "/reports_admin" but nothing appears to happen when I run it after loading an attachment into the first URL. Am I missing something or will I need to use the plug-in (which doesn't appear to have a "Copy" function)? Again, many thanks for your help. Colin
Fitch Posted April 22, 2009 Posted April 22, 2009 On second thought I think you will need the SC plugin. You're right there is no "copy" function per se, I believe you'd use the SCGetContainer function to get the existing file into a container, and then SCSetContainer to push that file into a new location. The plugin documentation has details.
Dr. Zathras Posted April 24, 2009 Author Posted April 24, 2009 Yes, that ought to do it. Many thanks for the help. Colin
Recommended Posts
This topic is 5690 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now