Jump to content

Bill C.

  • Posts

  • Joined

  • Last visited

Bill C.'s Achievements


Explorer (4/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges



  1. I'm using FMPro 8 Advanced. My database has got a many-to-many between tables A and B represented by a table AB -- so it's the normal A --B sort of pattern. In my application I have a form layout for A in which I want to allow the user to add a new AB record; i.e., relate an additional B to the specific A. I want to do this by way of a pick list, a new window that opens and presents a portal containing B records that might be added. (Ultimately I'd like this to be a multiple select list, but that's another story.) The trick however is to populate the portal ONLY with B's that aren't already related to A via AB. I'm at a loss as to how to define the corresponding relationship between A (or AB) and another instance of B that will provide just those records out of B. One thing I've considered is using a global field containing a multi-key constructed from the elements of AB related to the specific A, but I need a != relation and (as I understand) using a != with a multi-key would use "or" semantics and not produce the list I'm looking for. Any suggestions? Thanks in advance, Bill
  2. OK, I didn't look far enough in the forum. There's a solution posted in the thread http://www.fmforums.com/forum/showtopic.php?tid/159727/ so.... Never Mind... :
  3. I've just installed the ODBC driver from the FMP 7 Dev CD per the instructions, but the driver, "DataDirect 32-bit ..." doesn't show up in the list of available drivers in the Data Source Administrator. I'm running Win XP SP2 and have rebooted since installing. The install directory is there as expected. Any suggestions? Thanks in advance.
  4. Here's a trimmed version of the database. I think I've actually got it figured out using a global and a value list based on a relation as the validation rule. It all seems a bit roundabout, but I'm beginning to see that FMP requires a different mindset than I'm used to. I'm used to event driven architectures, whereas FMP seems to be more declarative. I still have a queasy feeling that I'm going to hit something that "you just can't do" in FMP, but thus far I've managed to find solutions -- thanks to these forums! Anyway, take a look at the Contact layout and the CurrentSelectedGroupID field in particular. Let me know if you see a better way. My current problem, BTW, is how to reinitialize the global whenever I open a new Contact record in the layout. My guess is that I'll have to do that in script and also require use of a button to actually transition to the layout (or a next/previous record within the layout.) Another problem is how to display the Group *name* in the CurrentSelectedGroupID field, but actually store the ID into the global so the relationship works. Any ideas? Spike.zip
  5. I'll post a file. Yes, a contact may be a member of more than one group (and of course a group may have multiple contacts in it.)
  6. I'd like to have a layout where selecting an element in a popup list causes a portal to repopulate. I'd have no problem with this in an event driven UI, but FMP's layouts aren't event driven. So, how does one do this sort of thing. Here are the details for my schema so we can talk about specifics. I have a many-to-many relationship between Contact and Group tables via a Contact_Group table. In the Contact layout I'd like for the user to be able to select one Group from among all Groups associated with that Contact. Based on that selection, I'd like to update a portal on that layout such that it lists all (other) Contacts that are in the selected Group. So in summary, the user selects a group and gets a list of all other contacts in that group. The first problem I have is how to make the initial selection of a Group cause a script to run. Perhaps I haven't done it right, but I can't seem to define a popup as a button so that the *selection* causes the button to "fire". So far I have to do the selection, then click the selection, but that seems pretty ugly. I'm assuming if I can solve this first problem that I can figure out how to repopulate the portal; although I certainly wouldn't object to any pointers or hints for that step too! Thanks in advance.
  7. So does the conflict get detected when the 2nd user opens a layout or when s/he attempts to save changes? Also, is this something you typically need to deal with in scripts? Thanks for the response.
  8. Thanks to both Adam & Stanley for clarifying how this works.
  9. With multiple users (Peer or Server) how does FMP deal with simultaneous writes? Does it lock records/tables? Does it throw an error? Thanks in advance.
  10. In a peer sharing (or FMP Server) situation how does FMP deal with globals? In particular if two users are using the same layout, but different records (in the same table), then can there be a race condition on a global in that table? Thanks in advance.
  11. Mark Interesting technique! I wouldn't have thought of that. I can see though how the number of layouts could grow very quickly using this technique. For instance I'll have 3 buttons (Client, Vendor, Employee) each of which can be there or not, so we're talking 2^3 = 8 layouts! Maybe I can figure out a way to use tabs to keep the number of layouts at least linear rather than exponential. With all these near duplicate layouts is there a clever way of maintaining them or do have to manually change all of them if you need to, for instance, add a field? Thanks.
  12. It is a standard of good UI design that you should not give the user an action when all the action will do is produce an error message; i.e., if the action is not permitted (or doesn't make sense) then don't give the user the option. In the MS Windows UI for instance buttons (and other controls) have a boolean Enabled attribute. If you set this to false then the button is presented in a "grayed out" manner indicating that the button is not operative. Ditto for menu selections. In some cases you might set the Visible attribute to false so that it doesn't even appear on the form (layout). That's what I meant by "not even tempting".
  13. I understand, but my intent is not to make the button ineffective, but to make it not even tempting! If I understand you correctly ("...you'll need to script your layout changes") you are suggesting that all transitions from layout to layout be done via buttons rather than simply selecting from the layout menu. That sounds like a reasonable solution to the problem. I'm just used to event driven user interfaces so it's hard to get my head wrapped around what's available in FMP. I have spent a fair amount of time perusing the FMP help on scripting and it looks like a good reference for getting the details once you know what you need to do. It isn't so good at helping you figure out "what you need to do" however. I'll take a look at the sample DBs however. That's a good suggestion. Thanks again.
  14. Reed Thanks for the further response. Sorry to be dense, but I don't find any where to put a calculated text value in button. I'm brand new at FMP so apologize again for probably missing the obvious.
  15. My fault for not being more clear. It's actually not 1:1 (or 1:n), but 1:<0 or 1>. IOW for every Client record there must be a corresponding Contact record, but a Contact need not have a corresponding Client record. If a Contact *does* have a corresponding Client record then there can be only one. A Client IS A Contact, but it is not the case that a Contact IS A Client. This also holds for Vendor and Employee. The "duplicate fields" are on the layout only, but refer to the table fields of the base class, Contact. IOW the layouts for Client, Vendor, Employee will all have a LastName field, but it will be bound to the LastName field of the Contact table. This is a "standard" schema for representing subclass relationships. Another approach is to let the base class (Contact) contain the union over the fields of all the subclasses (Client, Vendor, Employee), but that approach has it's problems too. I think you'll find both approaches in use "in the wild". Hopefully this makes better sense now?
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.