So, value list modification in the FileMaker client software is easy – it’s just a check box you can tick to give easy modification access. However, in a WebDirect solution, there is no easy way to do it. As a developer, you definitely DO NOT want to have to modify a value list every time a client wants it changed. It’s simply not worth your time.
The basic idea of this is that you use a related table and a filtered-related value list calculated between two tables to pull related records from the VL table in order to simulate a modifiable value list.
Here is my simple, effective work around.
We’ll start with the premise that you want your clients to be able to chance the “type” of person in a Person table in a WebDirect solution.
To begin, we’ll have two tables: Person and VL – short for Value List.
The Fields are fairly straight ahead.
Person::VL_1 is a calc field (Globally Stored) which just has ‘1’ as the calculation, and is evaluated as a number.
Filter::g_filter is just a Global text field which will be used later for filtering portals
Now, we add a self-join table for VL, which is a Full Outer Join if I’m not mistaken.
This allows us to look at all the values in the VL table via a portal looking at the Table Occurrence of VL_VL.
The layout I’ve created looks like this, but obviously yours will probably look different depending on your taste, theme, etc.
The “p” field you see up in the corner is my filter field – in this example it would be the g_filter.
I have it sorted alphabetically, but the filter is simply VL_VL::VL_num = VL::g_filter
The “New Value” button copies the number in the filter and makes a new record in VL_VL and pasted the filter number into the VL_num field – this assures that the proper related record will be filtered.
Now we’ll make a new value list. Generally I call them something like VL_#_TOfield where # is the VL number assigned to the VL set ( VL::VL_num), TO is the Table Occurrence prefix, and field is the field. So, in this case, for the Person::type field, I’d call it VL_1_PERtype
Select the first bullet “Use Values From Field” and then Specify Field. Select the VL Table Occurrence coming off the Person table, and from the left field-select box, pick the “value” field
Select the second bullet below the field-select box, “Include Only Related Values Starting From” and then select your Person table.
Now, when you add values to the VL table, and give the record the VL_num of “1”, the values will show up in the value list!
This simple work around for modifying value lists in WebDirect takes all of about a minute to implement when you get the hang of it and will save you lots of time and headache. The people using your WebDirect solution will also thank you!
Let me know if you’ve got any questions of comments!