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.

Syntax for live URL of a SuperContainer

Featured Replies

I can't seem to figure out the proper syntax for an unstored calculation field that gives me the always current file path to a supercontainer.

David says there is an easy way to query it, but I can't see how to do it without simply providing it everything I already know - therefore I am not asking it, I'm telling it!

Can give me a quick detail about that?

Thanks.

It's not a query, it's a calculation that you have to make. It can be anything that you want, but I recommend using databasename/tablename/recordID for your SuperContainer path.

Your full url would be something like:

http://myserver.com/SuperContainer/Files/databasename/tablename/recordID

Keep in mind that the "path" used by functions is just the part after "Files" in your URL.

  • Author

It's not a query, it's a calculation that you have to make. It can be anything that you want, but I recommend using databasename/tablename/recordID for your SuperContainer path.

Your full url would be something like:

http://myserver.com/SuperContainer/Files/databasename/tablename/recordID

Keep in mind that the "path" used by functions is just the part after "Files" in your URL.

Yes, I understand the path fully and completely. I just don't understand how to call it as you were describing yesterday.

What, exactly, would my unstored calculation field look like? Can you give me an example?

If you wanted to get the file information in an unstored calc you might make a unstored calc that looks like:

SCGetInfo(table::path)

You would want to make a stored calc for your path, which would look like

"/databasename/tablename/" & table::recordID

If you need a hand writing your calcs or scripts I can help you with the development in your database directly. Our rate is $165/hour.

  • Author

If you wanted to get the file information in an unstored calc you might make a unstored calc that looks like:

SCGetInfo(table::path)

You would want to make a stored calc for your path, which would look like

"/databasename/tablename/" & table::recordID

If you need a hand writing your calcs or scripts I can help you with the development in your database directly. Our rate is $165/hour.

Yes, I have that working fine. The SCGetInfo returns the 3 lines of information.

If you look at my original question, you had told me on the phone that it is wise to have an unstored calculation that always tells you the entire path, including the file name of the file that's stored there, live and dynamic.

I thought you said it used the SCGetFileURL ( macPath; winPath; folderPath ), however, I would expect that you could just get the generic "folderpath" and ignore the Mac & Win statements. Did you mean that you can take the supercontainer path, and add the filename to it in a calculation? Please explain.

You should never, never, never, never, never use a filename as part of your path calculation. Your SuperContainer path is like the name of a field, and you should treat it the same way.

I think you're confused about my recommendation.

My recommendation is to use SCGetInfo in an unstored calc to get your filename, rather than using a text field and trying to parse it out in a script while you're scripting the upload of a file. You now have a calculation that uses scgetinfo, and it is returning the filename for you. If you want to to show only the filename you can use the filemake getvalue function to get the first line of the information that is returned.

getvalue(scgetinfo(path); 1) will get you just the filename.

Your path field should be a stored calculation, which calculates to /databasename/tablename/recordID.

You can make a full URL calculation as well, if you want, which would just be the server URL & path field concatenated, giving you your full http://myserver.com/SuperContainer/Files/databasename/tablename/recordID which you could use in a web viewer.

  • Author

Perhaps I did misunderstand your recommendation. The SCGetInfo has always been obvious to me - I certainly would not want to blindly store a filename, and rely on the hope it never changed. It totally makes sense that you would query the container for its current contents. I guess I thought you were doing it a different way.

Thanks.

So, if you look at the first post of this thread, the answer to my question is in your last post:

My recommendation is to use SCGetInfo in an unstored calc to get your filename, rather than using a text field and trying to parse it out in a script while you're scripting the upload of a file. You now have a calculation that uses scgetinfo, and it is returning the filename for you. If you want to to show only the filename you can use the filemake getvalue function to get the first line of the information that is returned.

getvalue(scgetinfo(path); 1) will get you just the filename.

Your path field should be a stored calculation, which calculates to /databasename/tablename/recordID.

You can make a full URL calculation as well, if you want, which would just be the server URL & path field concatenated, giving you your full http://myserver.com/...lename/recordID which you could use in a web viewer.

Thanks for your help.

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.