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

How to show related field as checkbox...not always


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

Recommended Posts

Posted

Database A has field "components" that is formatted to show a related field from Database B as a checklist.

The problem arises in that this field is not wanted in all records. In fact, when it is not wanted, a different field "free text box" is desired in the same piece of real estate.

Is there a way to simply show/hide, if I have one field behind the other? There is no objection to having the user initiate the action.

Thanks!

Posted

Hopefully this is a Form view layout. In this case the usual technique is to duplicate the entire layout, then switch the fields on the layout. If, as you say, the user can hit a button (as simple as "Go To Layout ["the other layout"]").

As long as everything else is exactly the same, FileMaker will only redraw that 1 field, making it very fast. Of course, it makes it kind of a pain to work on the "twin" layouts afterwards. But not if all the buttons except that one are the same, and it's only Go To Layout. Just duplicate the layout again, and reassign the one different button. Toss the old one.

Posted

Unfortunately, the visibility trick doesn't free up any real estate; it just hides or shows one object. You can't re-use the space to show something else when the first object is hidden.

Posted

Actually, you can reuse space left by hidden (no recs) portal.

The attachment is modified Ugo's file

PS I've set accidentally the format of the related field to pop up list instead of checkboxes, you can change this

hideshowDj.fp5.zip

Posted

Yeah...

Me too. laugh.gif

I had tried several ideas yesterday night right on this sampler, using a portal with a constant too, but was obviously missing the "inimitable" brain cool.gif

So I ended up with this container workaround, hopefully skipped now...

Thanks Dj

Posted

It's because of fake relationship I have used.

You should use instead the true 1-1 rel.

For ex, assuming you have defined the recordID field (serial or whatelse) than you should define an calculation field:

cRecID=Case(showCheckBox, recordID)

Now define an autorelationship (auto means on same file) cRecID-->recordID

Use this portal instead of constant rel I've used.

You'll see that this time it won't break.

Dj

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