AnsweredAssumed Answered

Swap between value lists based on another table value

Question asked by ericjlawson on Feb 4, 2013
Latest reply on Feb 4, 2013 by ericjlawson



I have a Diary Note layout linked to a parent Customer table. Customers can have Invoices and Quotes, both of which are stored in separate tables.


When creating a diary note (navigated to from the Customer layout), I present a field on the layout called NoteType. This has a value list (hard coded) with four values. They are


  • Invoice
  • Quote
  • Enquiry
  • Other


Currently there is a field in the DiaryNote table called RelatedReference. If its a diary note about an invoice, the user wants to store the relevant Invoice code. If its about a quote, then the user wants to save the relevant Quote code. Or they can choose Enquiry or Other, neither of which require a Reference code value.


So, it was easy establishing the value list to get all invoices (and the Customer name from customer table as the 2nd field). This is what I did as the design evolved, when it was just Invoices as the NoteType.


Now, if the user chooses Quote as the NoteType, I want the data presented in the RelatedReference drop down value list to come from the quote table. If they choose Enquiry or Other I want to disable the RelatedReference field.


So the inspector easily allows me to choose on or the other Value List (I have named them CustInvList & CustQuoteList). However, I figure I must be able to setup a trigger on the NoteType field, so that when it changes I can fire a script that can change the Value List available via the RelatedReference field. Or if its Enquiry or Other, disable it.


I am fairly new to Filemaker but am reasonably experienced at programming and database design. So basically, I hoping I just need to know how to target the "Values From" attribute of the data element of the field. I would prefer not to have 2 separate field objects (1 per value list) and toggle them.


Thanks in advance