I've got a Contact Management file that a developer helped set up for me, and I'm trying to archive certain checkboxes and their respective values, and replace old checkboxes with new ones. I don't want to archive the contacts themselves; many would remain dynamic and very much part of the database.
The checkboxes are stored in Value Lists, in a table titled, "Settings." The "Settings" table does not have an ID field, so I'm unable to archive checkboxes and their respective values through a process that other users suggested in a previous post.
I'm concerned that if included an ID in my "Settings" table it could interfere with how my Contact Management file function. I don't know if that concern is warranted, but other users observed these value lists are dynamically generated; not simple lists.
Based on my Contact Management file setup, how I can archive certain checkboxes and their respective values -- from the checkboxes contain in my Settings table > Value List -- and replace old checkboxes with new ones?
Not sure I clearly understand, but I'll take a stab at it.
There are 2 basic versions of value lists
Custom value - a manually type list of items, displayed in the order stored in the value list
Field based value list. (and here is where it gets interesting).
The typical use case for field based, is a field that a user types something into, and the next time that field is entered, the previously typed items show up to pick from.
The less common use case, may be what you are looking for. It is based on the concept of key pairs - a category and and item.
A table can have the category field repeated many times, typically with a unique item in the second field. Many categories can exist, each with N number of items.
A related parent table with a global match field, can be related to category, and when selected, either through user input or code, filters the child table based on category. Then a value list based on the child table item would present just that set of items in that category.
To "archive" old value lists, change the category from say, "Appliances" to Appliances-Old, and those value list items would remain in the table, but NOT be selectable when someone picks the category "Appliances".
Not sure this answers your question or not......... if this does not help, please clarify the question if possible
To make this technique useful, here is one possibility to implement it.
You said you use a popover to open a window to a value list. Awesome.
Here is what you might do with that:
Background: you've created a keypairs table, with a parent table global field matched against category.
You have a defined field based value list from the child table ITEM, with the value list condition set for "include only related value starting from:" where the start is the field that has the global match table CATEGORY field.
Now create a button bar segment with a label that is the actual field. Make the button bar segment into a popover. Place the field in that popover with the value list defined above assigned. Create a script trigger on the popover, so that it sets the global match field to the category that is what you want the field to display.
Now all you need to do is manage the key pairs table to obsolete the CATEGORY name for the ITEMS you wish to archive. They remain in the value list key pairs table to be resurrected at any time.
Footnote: ( I wish there was a way to get a script trigger to fire on field entry, that could then be used to set the match condition and change the associated value list based on the selected category, but alas, the firing order does not provide for that. However, there is a way, but it's not easy or practical.)
Thanks so much for your help with this. Turns out, I finally figured it out.
Just had to create a new Value List with Custom Values, and cut the the old checklist values from Value Lists (with Custom Values containing those values) and paste them into the newly-created Value Lists.
Then, in the Layout view, I created a new field -- first, by referencing the right value list within one of my tables -- and then selecting the newly-made Value List containing my "archived values." So far, so good!
One quick question: How is it possible to rename some of the checkboxes without disturbing its values?
Not sure I understand. Whatever data is entered into a field, is the Data that exists in that field. If the value list at one point of time was what was used then, those values are what could possibly be in that field. If the value list changes, then future Records would have the value possibilities from that list. If you edit a historical record using the new value list, then the value in that field is going to change.
If you want to keep the historical values of the given field, then the best way may be to create a child table for that data. That way every new entry into that field becomes a new record and previous records are retained.
I'm not sure I understand your question BUT... I have a database with about 1,500 students for one of my clients. Only about 250 of them are "current/active" in one of our 3 programs. I want there to be a search box where you can type anything, but uses a valueless of ACTIVE students (by first and last name) to quickly autofill.
Here's a quick and dirty example of it that you can play around with.
Here are some details. My database looks like this:
Students::FirstName
Students::LastName
Students::FirstLast_c < an indexed calculated field = FirstName & " " & LastName
Students::LastFirst_c < an indexed calc field LastName & ", " & FirstName
Students::CombinedNames_c < an indexed calc field with last and first name combos
Students::Program < There are many values including graduated, program1, program2, etc.
Students::IsActive_c < an indexed calculated field = If (Students::Program = "program1" or Students::Program = "program2" ... etc ... ; 1 ; "")
Students::Number1ForJoins_g < this is a GLOBAL that gets set to 1 on my startup script which is triggered by: Menu / File Options / Script Triggers / OnFirstWindowOpen
Then I have the following self-join called Students_Active:
This works great because EVERY record has the same global field (set to the number 1) and it ONLY connects to students who have IsActive_c set to 1.
Then I have a value list which is is based on this relationship. Now where ever I have a value list of students it will always show students in programs 1-3, but no one who graduated or dropped out.
This means I don't have to manually make the lists, they're created dynamically based on some other criteria.
One minor caution, if you make these joins based on date and use "today's date" then it has to calculate everything dynamically, so nothing can be "indexed" (caching to load faster), so you'll see some slowdowns. This can be solved by having an automatic script that runs nightly if you're using Filemaker Server to Cache the data. It gets a little complicated, but if you're working on that LMK and I can flush it out more for you.