AnsweredAssumed Answered

Minor things I'd really like to know how to do in FileMaker

Question asked by PeterThorton on May 16, 2012
Latest reply on May 22, 2012 by philmodjunk


Minor things I'd really like to know how to do in FileMaker



this is just a few things I've encountered while creating a user interface in FileMaker, that I haven't been able to figure out yet. I'll just list the ones I can think of right now, hopefully they'll be easy to answer for you FileMaker pros.

First of all I should explain that I do a lot of buttons and scripting, users pick related record through search layouts and list layouts launched by clicking a button.

My first problem is, depending on what is done on those related layouts, when the user navigates back to the original layout, sometimes the record displayed on that layout has changed. I'll give you an example:

We have a table of customers (called BusinessPartner), some of those customers happen to be dealers. They are in the same table, because from our point of view they're essentially the same, regardless of whether they're a dealer or a customer. But we do need to track which customers are dealers, and which customers they deal to. So there's a join table between a dealer and a customer (which is essentially a join table between BusinessPartner and BusinessPartner).

Now let's say I have a customer with ID 1, displayed in my CustomerManagement layout. He's a dealer, and I want to assign a related customer to him. I click a button, FileMaker takes me to a searchbox layout and enters find mode. I do my search, and a list of all the customers that match the search criteria is brought up. I click on customer with ID 17, and an entry in the join table is created. Up until this point it works perfectly. But when I get back to the CustomerManagement layout, the customer displayed there is number 17, instead of number 1. How do I prevent this, or if this us unaviodable, how do I navigate back to my original customer? (the ID is accessible in the scripts, shouldn't be too hard)

Furthermore, there's a tab control on my CustomerManagement layout, and the 'related customers' tab happens to be the last one. But when I get back to the layout, the selected tab is the first tab. So the user has to manually navigate to the correct customer, and then the correct tab, just to see the results of their latest addition. How can I solve this?

The second problem is, how do I make some controls uneditable? As I mentioned, I need my users to enter data in a specific way, to ensure correct functioning of the solution. If they click in a field they're not supposed to, and edit the data, they can cause serious havoc in the database. I've played around with this issue, I've discovered that if I set the control up as a button and assign an empty script to it, it seems impossible to selct the text inside it by cliking it. The field can still be selected using the tab, but I solved that by removing it from the tab order. Is that it? Is there no other way of selecting and editing the field this way? Is there a more straightforward way of doing this, or is this workaround the only thing I can do?

Third problem: Can I disable or enable certain features of the user interface based on values in some fields? For instance I have a Yes/No field in my customer table that determines whether or not he's a dealer. If the field is set to No for a particular customer, I want the 'Add related customer' functionality to be disabled.