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

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

Recommended Posts

Posted

Greetings, oh wise ones!

I have searched and searched, but have yet to find much information on whether it is possible to hide an empty field on a layout, but show the rest of the record.

Specifically, I have a layout for required tools and supplies. Its table contains fields for item name, whether or not the item requires an MSDS sheet (Yes/No) and a container field which will hold the link to the MSDS PDF file (if one is required). Is it possible to hide the link field if it is empty, but show it (with border) if non-empty?

Thanks in advance,

Jeff

Posted

Hi Jeff,

Here's a bare-bones example. It uses the invisible portal technique to make or break a relationship and display the container in a portal only when MSDS = "Yes." You can also change those match fields to whether the container is empty or not but it seems that if MSDS = "Yes" then you would want the field to display even if it doesn't contain a PDF so you'll know you need one - or staff can insert it. Anyway, this is the idea and invisible portals can be based upon just about anything.

I prefer using 1/0 instead of yes/no. I use one Value List called Select with a 1 in it. Then I can attach the same Value List to many many yes/no toggle situations. And, as in this case, it could take advantage of Boolean logic and produce a cleaner relationship. wink.gif

LaRetta

hide.zip

Posted

Nice! That seems to do exactly what I want it to do. Took me a while to pick apart your example and stick it in my head (coffee2.gif), but I think I understand it now.

Thanx.gif

Posted

LaRetta,

Portals are new to me, (I'm used to PHP/MySQL type systems... still just an FMPro newbie smirk.gif) so maybe I'm not understanding something about the workings, but I see a problem.

When there is only one record, your example is perfect... does everything I want it to. When I add a new record, however, it behaves strangely. If the MSDS radio button is set to "Yes" when the new record is active, I expected the portal to display the container field with nothing in it, since I had only added a PDF link to the first record. However, it displays the same link that was entered in the first record! That shouldn't happen, should it? Shouldn't one be able to add a separate PDF for each record, if one is required?

Confoozled,

Jeff confused.gif

Posted

I think I solved the problem... I had to add something like "ItemName = ItemName" to the self-join relationship in order to get it to show the correct record. I thought I had tried that before my last post and it didn't work, which is why I was so confused. I must have clicked the wrong field on accident on one side of the relationship when defining the criteria. It seems to work now! *shrug*

Thanks again for the help. You'll see me next time I have a problem! grin.gif

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