Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4652 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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.

Posted

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,

  • Newbies
Posted

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"

Posted

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,

  • Newbies
Posted

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().

Posted

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,

This topic is 4652 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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