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

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

Recommended Posts

Posted

Hi. I'm really new to both Filemaker Pro and Server and the SuperContainer plugin and have encountered a small issue. I'm trying to make a simple database that allows image uploads via IWP (already got that covered), but I'd also like to make a field that can keep track of how many SuperContainers actually contain an image at a given time. I couldn't find any way to make an indefinite number of SuperContainers (ideally, I'd like it if the client could keep adding images, each time creating a SC, but I haven't been able to find any way to do so), so I created 5 SC's and the client can just upload/delete an image from each SC. When I was using regular containers, calculating the number of occupied repetitions was pretty simple, but I've had no luck with SC's. It isn't possible to make webviewer fields with repetitions, is it? Can someone tell me some script or calculation that I can use to make each report display the number of occupied SC's (out of 5)?

Also, I was wondering if it is possible to create a thumbnail of an image in a SC so that I can display it in table view. I've tried using the getContainer action, but it just brings up a blank box, even when I mess with width, height, and resolution.

For both of these issues, I have no problem with using additional plugins, provided they are supported by IWP.

Please explain things to me in a way that someone with only a small amount of experience can understand.

Thanks.

Posted

This is just some calculations you'll need to do in filemaker, not anything with SuperContainer, really. You can use the SCGetInfo function of the companion plugin to see if there is a file at a particular URL (it will return blank if there is not one), but beyond that you'll need to use regular filemaker functionality to do your calculations. A summary field will probably do what you are looking for.

You cannot use web viewers in table view, but you could use an unstored calculation with a container result using SCGetContainer from the companion plugin to get a thumbnail and store it in a calculation which you could display in table view or in a portal.

You will need the enterprise license of SuperContainer for doing any of this in IWP.

Posted

This is just some calculations you'll need to do in filemaker, not anything with SuperContainer, really. You can use the SCGetInfo function of the companion plugin to see if there is a file at a particular URL (it will return blank if there is not one), but beyond that you'll need to use regular filemaker functionality to do your calculations. A summary field will probably do what you are looking for.

You cannot use web viewers in table view, but you could use an unstored calculation with a container result using SCGetContainer from the companion plugin to get a thumbnail and store it in a calculation which you could display in table view or in a portal.

You will need the enterprise license of SuperContainer for doing any of this in IWP.

Thanks for the quick response. I've actually tried both of those methods, but I must have made a mistake somewhere. For the field that counts SuperContainers, I wrote the calculation as "not IsEmpty( SCGetInfo(path/to/file1 ) + not IsEmpty( SCGetInfo(path/to/file2 ) + ..." (I didn't actually include the file name or type (jpg in this case) because I assumed that it wouldn't matter since SuperContainer creates a unique folder for every image). I figure this isn't a very efficient calculation since it could get very annoying if I'm using more than just a few SuperContainers, but my result would always turn up as 5 (as in 5/5 SuperContainers are returning something, even if they shouldn't).

As for the SCGetContainer method, I attempted to use that and kept getting blank boxes in the table view. Do I need to set width, height, resolution, and page parameters for it to work properly? Also, the documentation neglects to mention what the page parameter does. What would I put there?

I realize that I'm probably making very amateur mistakes and I appreciate your help.

Posted

It sounds like your scgetinfo function may be returning an error, or there may be a problem with your total calculation.

SCGetContainer will return the original document if you do not specify a width and a height. If you specify those parameters SuperContainer will give you an image preview rather than the original file. The page parameter is for getting a preview image of a specific page of a pdf document (for users running SC in stand-alone mode on a mac server).

Posted

Alright. I'll make a field and run SCGetInfo when I have a chance and see if it returns 'ERROR'. Other than the possibility of an error, though, it seems unlikely that the calculation would be wrong since I'm just adding up the 1's and 0's that would return from true or false. I suppose I might be incorrectly entering the method, though. I'll give an example of how I wrote up the calculation:

We'll say I've created a file called "File1" and I've stored it in MacHD/Users/Shared/SuperContainer/Files/Pictures/1 (I guess I should have mentioned before that I'm using a Mac). For whatever reason I set the webviewer so that it stores every picture in its own folder.

I then write the calculation as:

not IsEmpty(SCGetInfo(MacHD/Users/Shared/SuperContainer/Files/Pictures/1 )) + not IsEmpty (SCGetInfo(MacHD/Users/Shared/SuperContainer/Files/Pictures/2)) etc. Should I enter the name of the file at the end of the file path? If so, do I need to provide the file extension?

As for SCGetContainer, I suppose this means that I should be using the width, height, and maybe the resolution parameters. Does this mean that the pictures won't scale down automatically to fit in the table view? I ask because I don't exactly know the optimal height and width, although I guess I can try different things until it works.

Thanks again for your help.

Posted

Your path is wrong in this case. Your paths should be "/Pictures/1" and "Pictures/2". Just like a web server, your client's don't need to know where on your hard drive the files are being served from. All SuperContainer URLs create directories in the SuperContainer Root directory.

Also, make sure you have called SCSetBaseURL before calling any other SC Plugin functions. I suspect that this is the error you are receiving.

  • Like 1
Posted

Sorry for the delayed response. I just got the SCGetInfo to work thanks to your most recent piece of advice. I'm going to try the thumbnail now.

Thanks

Posted

It looks like now I'm receiving "ERROR" in my thumbnail boxes in the table. I've been messing with the width and height, but nothing seems to work. I still haven't set a resolution. Do I even need to use a height, width, and resolution, or should it scale down automatically? Also, I'm using the same file path that I'm using for SCGetInfo; is that correct?

Thanks.

Edit: Wait, wait. Now something else is happening. Even though my picture count calculation is working fine in filemaker pro, when I go to IWP, it gives me 5/5 even though that isn't correct.

Posted

Yes, you would use the same path as you're using for scgetinfo.

ScGetContainer will get the original file if you do not specify a width and a height. If you add the width and height parameters it will grab a thumbnail of the specified size instead of the original, so I definitely recommend using that if it's something you want to do.

Make sure you have the plugin installed in your WPC/Plugins directory to use it with IWP. Also, keep in mind that you need the enterprise license to use SuperContainer with IWP.

Posted

Yes, you would use the same path as you're using for scgetinfo.

ScGetContainer will get the original file if you do not specify a width and a height. If you add the width and height parameters it will grab a thumbnail of the specified size instead of the original, so I definitely recommend using that if it's something you want to do.

Make sure you have the plugin installed in your WPC/Plugins directory to use it with IWP. Also, keep in mind that you need the enterprise license to use SuperContainer with IWP.

Can you be more specific about the location of the WPC/Plugins directory? I did run the installer if that's what you mean.

Also, do you have a general idea of what height and width I'd like to use for a table field? I'm not a good judge of these things.

Posted

Are you saying that I can't use SuperContainer with IWP on my own computer (for testing purposes) for the two hours of demo time?

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