FM - How to Tell if a Container Field is Empty

I have a table called "Pictures" and in it a container field with a file path.  I want to be able to tell if this container field is empty, so I can filter out these records from my portal if they are empty.  I don't usually create empty records, but rather than creating a record for every single picture we have, I have just created 200 records and then change the global PropCode field on the fly depending on what property I am on in my Property table.  See file path below for the field ImageContainer_cc.  If this were a SuperContainer field, I could just use the SCGetInfo function, but this is a Filemaker container field.  Thanks.

"imagewin:/S:/Website/Lee/" & PROPERTYINFO::PropCode & PROPERTYINFO::EntityNum & PROPERTYINFO::BldgRCode & "/"
PROPERTYINFO::PropCode & PROPERTYINFO::EntityNum & PROPERTYINFO::BldgRCode & "IMG" & Pictures::RecID & ".jpg"
LVL 2
rvfowler2Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Will LovingPresidentCommented:
Standard FileMaker function for checking if a field has no contents is to use:

     isempty( fieldname )

for the inverse you can use

     not isempty( fieldname )

( I personally own a T-Shirt from an FM DevCon that has "Not IsEmpty" printed on the front)
0
rvfowler2Author Commented:
No, this doesn't recognize it as empty (of a picture) because the text path still shows up.  For example, in my portal, Pictures::ImageContainer_cc shows no picture, but if I put in in the IsEmpty function, I still get a 0, because with my Pictures::ImageContainer_cc calc, it returns the text of
imagewin:/S:/Website/Lee/IN100275/Agents/IN100275IMG196.jpg
0
Will LovingPresidentCommented:
That's because it isn't empty. If you're using Store as Reference Only then it will contain the stored path. Now, if what you are wanting to do is determine if the IMAGE exists on the path stored in the Container field, that's something else entirely. For that you need to use something like the Troi file Plugin or similar (there are other plugins out there that do the same thing, some for free. I'd start with the BaseElements plugin).

With the Troi File plugin, I use the TrFile_Exists( ) function, e.g.

     TrFile_Exists( "" ; $$ImageFolderPath  & Images::ImageName )

The free BaseElements Plugin which I think comes bundled with FM 14 has a similar BE_FileExists( ) function

http://www.goya.com.au/baseelements/plugin
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rvfowler2Author Commented:
Thanks Will, you always have the answer.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
FileMaker Pro

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.