Jump to content

Problem with SCGetInfo


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

Recommended Posts

Based off of my previous posting, I gathered that SCGetInfo would need to use the actual local path instead of the web url (correct me if I'm wrong on that) but currently the path that I am passing is returning "?" as a result. I have it setting a field to (hopefully) the uploaded file's name.

Set Field[Docs::DocName; SCGetInfo("/Users/Shared/Supercontainer/Files/" & (insert parent directory name) & "/" & (count+1)]

The count+1 portion merely is a count of how many files each parent directory already has tied to it, as listed within a child-table.

Link to comment
Share on other sites

First,

when a plug-in function call is returning "?", this means that the plugin has not been properly installed on the client (or server if using IWP). So, if this is the case, I recommend revisiting our documentation or product support wiki page and running through the plug-in installation process. If you need any assistance with this, please do not hesitate to contact me directly at the e-mail address or phone number listed below and I would be happy to walk you through this.

Secondly, and I -may- be assuming here, but it seems like your "folderPath" is off here as well. For function calls such as SCGetInfo(), SCGetContainer, SCDelete(), i.e., any functions that act on files located on the SuperContainer server, you need to pass the path to the file on the server.

Quick lesson:

A SuperContainer URL is composed of three 'main' parts:

1. The Base URL (can be a combination of the base URL and protocol)

2. The Protocol

3. The Folder Path (written as "folderPath" in our documentation -- refers to the path to the file on the server)

The baseURL is what needs to be called before ANY other plugin function can be used and an example would be:

"http://localhost/SuperContainer/Files"

Next, we have the "Protocol", which is one of two things:

1. "/Files"

2. "/RawData"

Thirdly, we have the "folderPath", which is a series of directories that point to the location at which your file is being stored. The recommended structure for this folderPath is "databaseName/tableName/recordID". An example would be:

"/EmployeeDB/Employee/2", or a bit more common, "/EmployeeDB/Employee/" & EmployeeTBL::Employee ID

So, when using these plug-in functions, be sure you are using the "folderPath" as the parameter passed and not the full SuperContainer URL, which is what is usually passed into a Web Viewer/browser, and could look like:

"http://localhost/SuperContainer/Files/EmployeeDB/Employee/" & EmployeeTBL::Employee ID

I hope this clears some things up. You should take a look at the SuperContainer Demo, available at:

http://demo.360works.com/SuperContainerDemo/PortalUseAdmin.fp7

this will definitely help you get a grasp on various ways of using SuperContainer.

Regards,

Link to comment
Share on other sites

I apologize for some of the lack of information, but let me clarify somethings.

First, the SCSetBaseURL is in place, didn't enter it onto here, my fault.

Second, the plugin is installed correctly as some other plugin functions work perfectly fine.

Third, the /Users sections is the path on the actual server where the document is located after it is uploaded. So either I am entirely misunderstanding you, or I am not speaking very clearly either.

Link to comment
Share on other sites

I see.

Well, if it is returning a ? while other SC functions are not... then that is strange behavior and it may be best if you could either give me a call at the office or that we set up some time to screen share/Skype about this issue.

By default: "/Users/Shared/SuperContainer/Files" is where your files will be stored on the server. However, the folderPath that you will want to pass into the SCGetInfo() function will be the directory structure that follows that.

For example, the location of the file on your server machine could be:

"/Users/Shared/SuperContainer/Files/EmployeeDB/Employee Record/Employee0302481A8438/Document/resume.doc"

your SCGetInfo() would look similar to:

SCGetInfo( "/EmployeeDB/Employee Record/Employee" & Employee::ID & "/Document" )

Hopefully this makes a bit more sense. Again, it may be best for the two of us to screen share some time/hop on Skype to try and tackle this together.

P.s. Did the example SuperContainer filemaker database I posted earlier help to clear anything up?

Link to comment
Share on other sites

This topic is 4519 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.