z178 Posted September 1, 2007 Posted September 1, 2007 How do I Create a multivalued Field in filemaker. Like a Category field that would also allow to add new categories. Any pointers to any articles in this context? Thanks in advance.
Inky Phil Posted September 1, 2007 Posted September 1, 2007 Set up a table for categories with one record for each category. Phil
LaRetta Posted September 1, 2007 Posted September 1, 2007 A value list (probably Custom) might also do the trick. We would need more information to better suggest what to use. Read up on Value Lists in help.
z178 Posted September 1, 2007 Author Posted September 1, 2007 (edited) My idea of a multivalue field is one that displays and accepts mutliple comma seperated values For example To enter the page reference to an item that occurs in page 12, 14 an 19 of a book, the field should display the value as 12,14,19 Should I need to enter another page reference in this field, I can add it by typing ,23 and so on.. Does filemaker have a builtin feature or should I make a script to get this functionality? Edited September 1, 2007 by Guest Clarification
Søren Dyhr Posted September 1, 2007 Posted September 1, 2007 My idea of a multivalue field is one that displays and accepts mutliple comma seperated values But it isn't propper relational database design, which perscripe one fact per field. http://en.wikipedia.org/wiki/First_normal_form But you are exploiting the dispute, or??? --sd
z178 Posted September 2, 2007 Author Posted September 2, 2007 (edited) Oops! Post intended for the Right side of brain. Its not the table structure, its the display of multiple records in a single field that I'd like to know about. Should I repost? Edited September 2, 2007 by Guest
comment Posted September 2, 2007 Posted September 2, 2007 Should I repost? No, but you should clarify. There's no problem setting up a text field and typing whatever you wish into it, including "multiple values" like "12,14,19". The problem is Filemaker does not see them as separate values - it treats the entire entry as a single text string. So you can enter them this way, but there's not much you can do with them after that - other than looking at them. (One exception to this rule is values separated by a carriage return: these will be recognized as separate values when the field is used as a match field for a relationship.) For a book index type of solution, you should have a table of items, and enter the page references as separate RECORDS in another, related table.
z178 Posted September 3, 2007 Author Posted September 3, 2007 (edited) I understand.. The functionality I am trying to achieve a kind of feature in "tag" fields in some cocoa applications. The same kind of blue tags appear after you enter an email in mail.app. Some other apps where I have seen this functionality are - YEP, Journler or the gmail Labels where you can apply multiple labels and sort them based on labels. So an entry in journler can be tagged as "programming, Applescript, Filemaker" another as "Tooltip, UNIX" and so on... Am just wondering if I could write a script so that when a user enters comma separated values, Filemaker formats it as return separated values within the script and adds it to a related table? In other words, can I use a script to display a return separated list as comma separated values? Would that help me in what I am trying to achieve? Edited September 3, 2007 by Guest
comment Posted September 3, 2007 Posted September 3, 2007 (edited) if I could write a script so that when a user enters comma separated values, Filemaker formats it as return separated values within the script and adds it to a related table? You could write a script to do ONE of the two. Briefly, you have two basic options here: one is to keep your tags as a return separated list in text field within the item record. This is essentially the same as having a checkbox with predefined values (in fact, a checkbox field IS a return separated list of the checked values). This option will allow you to filter items by selected tag/s - but not to sort them or to report them grouped by tag (because a single item cannot appear under more than one tag). The other option is to create a related record for each user-entered tag. This will enable the grouped reporting, but it will be more elaborate to set up. A script must be run after each modification of the tag entry field (i.e. the user must click some button, or you will need to use a plugin). In other words, can I use a script to display a return separated list as comma separated values? That's not the same thing - that's the reverse action. But yes, that too is possible. EDIT: If you choose the first option, the conversion from comma-separated to return-separated can be done in a calculation field, without a script. Edited September 3, 2007 by Guest
Recommended Posts
This topic is 6290 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