October 22, 200322 yr 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!
October 22, 200322 yr 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.
October 22, 200322 yr This sounds like job for John Michael Osborne's VISIBILITY trick! Follow this link: http://www.databasepros.com/FMPro?-DB=resources.fp5&-lay=cgi&-format=list.html&-find=+&topten=1&-FIND=+&released=1&-sortfield=new&-sortfield=rating&-sortfield=creation_date&-sortorder=descend&-max=5 Abbe Lougee
October 22, 200322 yr 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.
October 23, 200322 yr See attachment.... The best I could get by not following Fenton's advice Which you should actually... hideshow.fp5.zip
October 23, 200322 yr 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
October 23, 200322 yr Yeah... Me too. 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 So I ended up with this container workaround, hopefully skipped now... Thanks Dj
October 23, 200322 yr Author It seems to break when there is more than one record. Thanks for all the efforts!
October 23, 200322 yr 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
October 23, 200322 yr Added auto-enter 0 in showHide field and serial_1 and serial_showHide fields to fix the relationship. It should work now. hideshowDj2.zip
Create an account or sign in to comment