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.

Featured Replies

Hello all!

First time post, trying to figure something out with my distribution. Single machine style distro, and I'm not able to get SCScanDirectory to return anything. Currently, just for testing, I'm trying to set a field in a table I've created (for testing) to the results of the SCScanDirectory function. I do have SCSetBaseURL set previously in the function, just for clarification.

Currently, the function is SCScanDirectory("http://xx.xx.xx.xx:80/SuperContainer/Files/Salem Glen" ; True )

The Salem Glen is the name of the "parent" directory in the file structure that I have created.

Any help would be greatly appreciated.

Hey there Ackerman,

First off... thanks for choosing SuperContainer and welcome to the forums!

It looks like our SCScanDirectory() function does not return "ERROR" as is mentioned in our documentation but instead returns an empty list, which makes it appear as if nothing is returned (which is true). I have just edited our source so that it returns "ERROR" upon failure instead of simply a empty list, which should help in debugging your own solutions. So, thanks for pointing this out as it was a necessary change....

HOWEVER,

the path you are passing in is in fact invalid. I am sure it can be a bit confusing since a lot of our plugin functions request a "folderPath", which refers to the path to the document/file on the SC Server... but, in this particular function, the "path" refers to the local path of the file (i.e., Get ( DesktopPath ) or "/Macintosh HD/Users/username/Desktop/myFolder" ). The first parameter you are passing is actually a complete SuperContainer URL, which is an invalid value to pass.

The rest of your call looks great. So, as an example:

SCScanDirectory( Get ( DesktopPath ) ; true );

I hope this helps. If you have any additional questions or need clarification on this issue, please do not hesitate to contact me at the e-mail address or phone number listed below.

Regards,

  • Author

Now the problem I'm having is with multiple files being in the same area. Based off of the naming convention I have performed some math calculations to get the number of files in the directory.

For example, the same path that I was using before (albeit corrected, still the Salem Glen parent directory) has 1 file in it (currently Salem Glen/1/test.txt) Using a wordcount function and some math, I can get this to return and save it to a variable ($$count currently = 1) While trying to code in an Upload button, I have figured this in. So right now my url is as follows, as passed through an OpenURL function.

"http://xx.xx.xx.xx/SuperContainer/Files/Salem Glen/" & ($$count + 1)

For some reason this is not working, it currently opens "http://xx.xx.xx.xx/SuperContainer/Files/Salem Glen/1" when it should be opening "http://xx.xx.xx.xx/SuperContainer/Files/Salem Glen/2" . I can include more information if this wasn't enough, such as the exact formula it uses to calculate $$count.

How are you tying the files to a record? In my setups, as they suggest in the documentation*, I use the unique recordID for the filename. So, my path is: /DOCS/ID. I wouldn't need to count files, I just count records.

* see the section "SuperContainer URLs"

  • Author

The problem is that for each record ID I may have multiple files, the people I'm doing the database work for said that there could be upwards of 20 files tied to one recordID (effectively).

Why is that? Can you describe your table structure? My instinct tells me you need a child table.

  • Author

It's for a realty firm, so I have a list of Subdivisions that may have multiple properties. The subdivision that I've been working/testing with (trying to get thinks working at all, much less dynamic) is Salem Glen. For Salem Glen (regardless of the address), I may have up to 20 documents.

I'd use a child table "Docs" to the parent "Subdivision". Do you also have doc types?

Or, is a document really related to a parent "property" which in turn is related to a parent SubDivision.

  • Author

That might be possible, but I'm not sure how to make IWP update the child table every time a document is uploaded.

Give them a button that creates a child record and switches to its form view, all ready for upload.

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.