brwnis Posted October 26, 2005 Posted October 26, 2005 OK so I have a Contracts table related to a Company table by a CompanyID and the Company table is then related to a Contacts table by the CompanyID. I have a layout based on the Contracts table where I can enter a CompanyID from a value list and then have only the Contacts associated with that Company show up on the ContactID value list. However, it only seems to be working with values already existing in the list. I want to be able to include a button on the layout so that if the user finds the Company (or Contact) they are looking for isn't already included, they can click the button and go to a layout to add the contact, then return to the Contract layout and the new Company/Contact will be included on those lists. It works for Company - go back and the new Company pops up with the others, but not for Contacts at that Company. Even if I try to only add a new Contact at an existing Company they still don't show up. I tried redefining my value list to show all (versus only relational) records, then went back and selected my new Contact, and then reset the relational records value list definition, and it then recognized my new contact. But time and time again this is the only way I can get it to work, which obviously is wrong. Any ideas what's going on?
comment Posted October 26, 2005 Posted October 26, 2005 Try ending your script (it is a script, right?) with: Commit Records/Requests [ No dialog ] Refresh Window [ Flush cached join results ]
brwnis Posted October 26, 2005 Author Posted October 26, 2005 Comment, Thanks for looking into this! Do you mean a script for the button? I haven't gotten that far yet; I was just trying to check and make sure the relationships worked so far, by just switching between layouts manually, but ran into this hiccup. Would the steps you mention be included in the button script then? Thanks again!
comment Posted October 26, 2005 Posted October 26, 2005 Yes. For testing, you can make yourself a little button with just the action of 'Refresh Window [ Flush cached join results ]' attached to it.
brwnis Posted October 26, 2005 Author Posted October 26, 2005 I think I must have missed the boat on this one. I've attached my file; my value lists seem to be acting very funny on several fronts: not only are they not updating when new records are created in the related tables (I tried creating the button you suggest, but wasn't able to find a way to define it with the exact command above), but even existing records are only showing up when certain conditional values are present - ie, if companies A,B and C already exist and all have contacts associated with them already, only the contacts for company B are showing up. The same problem (with the same construction) is present in the portal farther down, where I am identifying Suppliers through a value list, and based on that selection, getting a conditional value list of Products from that Supplier. But it's only working for a couple of the suppliers! Being new at all this I'm sure I must be missing something obvious - can someone take a look? I really appreciate the help!! ContractsWorkingCopy8.zip
comment Posted October 27, 2005 Posted October 27, 2005 1. In the 'Specify Button' window, turn on the option "Flush cached join results". 2. I am a bit confused regarding what your file is supposed to do. In the items portal: am I supposed to pick a supplier first, then get a choice of that supplier products? I don't think your relationships are set up to support that.
Recommended Posts
This topic is 6968 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 accountSign in
Already have an account? Sign in here.
Sign In Now