FM - Is There a Way to Make a Value List Dynamic?

Is There a Way to Make a Value List Dynamic?  Two areas of application:  1) My boss wants the ability when he changes a value list that the actual data in the fields change to match.  I'm doubtful about that as it does not seem to be the way value lists work.  

2) Fields and script names change in a calc box when you change their names; however value lists do not.  I've emailed Filemaker as a suggestion for improvement.  Is there a way to make value lists dynamic?  

Thank you.
LVL 2
rvfowler2Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Will LovingConnect With a Mentor PresidentCommented:
Well, sometimes a developer will setup a single table for a single value list, and they will setup a ValueList table that includes ValueListName, a field for the name of the value list thereby allowing the inclusion of multiple value lists within a single table. In order to actually generate the value list, a relationship is created from a global field that simply contains the name of the value list as it appears in the ValueListName field, one global for each value list in the table.

But that may be more than you need for the moment. So yes, a separate table solely for the value list values. If you have an Admin area, you might want to setup a separate relationship and portal for the purpose of user edits to the list or you could just make a separate layout and button/script combination that pops up an editor (portal or list) that allows the user to edit values. You WILL need to script a Find/Replace if the user wants to delete rather than just edit one of the existing values.
0
 
Will LovingConnect With a Mentor PresidentCommented:
I think your first question is really asking, "is there a way to force and update of the existing entries on all records for a specific value list value when the user edits the value list itself?'

Assuming I've restated the question correctly, the short answer is that there is no built-in way to have this update occur, especially if you are using File -> Managed -> Value Lists and editing the custom values. You can setup a separate routine or manually use the Replace command, but FM will not replace one value with another automatically when you edit a custom value list.

Value lists however can be based not only on a user specified "Custom Values" value list but also on existing values in the actual field being edited or in another field. If the Value list is set to show only values that already exist in a field (rather than Custom Values), you can create a script tied to a button or menu item that presents a Find/Replace dialog which then does a Find for all records with that value and performs a Replace between the two terms. The Value list should then only show the new Term. Care must be taken with this approach so as to Replace the [entire value rather than just part of an existing value. You have to error check for values that may already exist in whole or as part of other values. e.g if you have two towns, Montague and Montague Center, performing just a replace on the word "Montague" will also Replace the "Montague" in Montague Center unless you setup the calculation to Replace the value of "Montague¶" rather than just the word.

Another way to make flexible, dynamic value lists is to setup a table with the value list values and serial numbers. Change the value assigning system so that when you select the value, you are actually assigning the Value's serial number rather than the value itself.

If you give the user a portal in which to edit these values, then they can edit them to their heart's content and the values will update across the database because the serial number remains the same as with any related record.
0
 
rvfowler2Author Commented:
Yes, you reworded my question correctly.  So, in the last two paragraphs, you are not suggesting a sub or normalized table, but just a table with 1 record for every value and then create a relationship between that T.O. and the field in the main table?  And the relationship as you suggest is by the number, not the text value, thus when you change the text, it changes throughout the dbs?
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
rvfowler2Author Commented:
A good solution, but I do hesitate to give user ability to delete and replace text throughout a db.  Could be trouble.
0
 
Will LovingPresidentCommented:
Limit access the editor via  checking the privilege set of the account user at the start of the script or simply limit access to the field to Read Only.
0
 
rvfowler2Author Commented:
Good idea; thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.