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.

Identifying SC web viewers that contain files

Featured Replies

  • Newbies

I am using SuperContainer on my Server to provide upload and download capabilities in an Instant Web Publishing solution. I currently have a web viewer on a detail IWP layout that provides the user the ability to upload/download a file from that web viewer in the detail layout from their web browser. The problem is every time they go to that web detail layout their web browser has to load the applet so they can see the web viewer with any attached file. I would like to remove the web viewer accessing SuperContainer from the detail layout and instead create a tab on the detail layout Named: 'Attachments'. When they click on the tab they will go to another layout that will have the SC Web Viewer. Only some of the records have files attached *uploaded through SC into the web viewer......and this will cut down on the applet having to load if they only look at records without attachments added. I want to notify my users on the Attachments tab if the attachments layout has a file uploaded by Dynamically marking the attachments tab in some way (I have lots of ideas) that an attachment has been added to that record. Does anyone know how I can identify that a record has a file that has been attached and exists through SuperContainer for that record? If the web viewer/SC upload was just a normal field I would use the is empty() function. Thanks for any help.

Hey Maco,

You can check if a file has been uploaded to a particular folderPath in SuperContainer by using the SuperContainer Companion plug-in function, SCGetInfo() which returns "" if no file is present, otherwise it returns a few pieces of metadata (such as the filename, size, date uploaded, etc.)

By wrapping this in a FileMaker Case statement, you should be able to get the results you're looking for.

I hope this helps,

  • Author
  • Newbies

I used option 2 to install SC on my FMadv Server.

Option 2: Installing SuperContainer with FileMaker Server Advanced

Thanks for your reply....but how do I access the function SCGetInfo() to add it to a case statement in filemaker pro? The filemaker solution running the the FM adv server I loaded SC to with Option:2 above says it cannot find this function.

The web address in my web viewer that I have on my IWP layout to allow my users to upload/download files is as follows:

"http://"

& "myserveraddress:80"

& "/SuperContainer/Files/"

& "NameIWantStoringFolderToBe"

& "/" & id_field

//Replace this with the primary key field of your table. This is usually an auto-entered serial number.

&"?style=info"

Maco --

You need to install the plug-in into your FileMaker Pro client in order to use this function.

Your resulting SCGetInfo() call should look similar to (after calling SCSetBaseURL()):


SCSetBaseURL( "http://myserveraddress:80/SuperContainer/Files" )

SCGetInfo("/NameIWantStoringFolderToBe" & "/" & id_field )

Regards,

  • Author
  • Newbies

Boy, I think I should downgrade my FM expertise from intermediate to beginner. Thanks for your help.

I now need to know how to call SCSetBaseURL().

I currently have a calc field that with the following syntax:

SCGetInfo("/NameIWantStoringFolderToBe" & "/" & id_field )

The result is "error" and as I understand it that is because I have not called SCSetBaseURL().

Maco--

Take a look at our documentation, it goes into some great detail on how to call the SCSetBaseURL() function. The first four paragraphs of the documentation answers/explains how to do this function call (as well as other SC Companion plug-in function calls) fairly well.

If you have additional questions regarding the baseURL call, I'll be happy to answer them.

P.s. Making use of the "SCLastError" function is invaluable! Try using it and taking a look at the "Error Handling" section in our documentation to learn how.

Good luck,

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.