Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Scripting a SC to SC copy

Featured Replies

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

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.:o

"http://localhost:8020/SuperContainer/Files/" & $newLocation

Does that make sense?

  • Author

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

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.

  • Author

Yes, that ought to do it.

Many thanks for the help.

Colin

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.