![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have some "flat" (single table) databases that contain Subject term fields formatted as checkbox arrays where one or more keywords can be ticked off according to content. Now I realize that I could make much better use of this information by creating a Subject Term *Table* in FMP8 -- I could print out nice indexes of subject matter, for instance. So, I'm trying to figure out how to import the flat field data from the original database into a new multi-table database so that each "checked off" value in the Subject Term field becomes a single record in the Subject Table, right? I feel stumped -- I seem to recall when importing other files seeing an option for splitting "Repeating Fields" into separate records - but what about splitting multiple values in a checkbox field into separate records? |
#3
| |||
| |||
|
|
I have some "flat" (single table) databases that contain Subject term fields formatted as checkbox arrays where one or more keywords can be ticked off according to content. Now I realize that I could make much better use of this information by creating a Subject Term *Table* in FMP8 -- I could print out nice indexes of subject matter, for instance. So, I'm trying to figure out how to import the flat field data from the original database into a new multi-table database so that each "checked off" value in the Subject Term field becomes a single record in the Subject Table, right? I feel stumped -- I seem to recall when importing other files seeing an option for splitting "Repeating Fields" into separate records - but what about splitting multiple values in a checkbox field into separate records? Thanks for any pointers! Albert |
#4
| |||
| |||
|
|
You'll have to use a script that loops through each record creating all the appropriate related records that are needed. The easiest way to create these related records is to use a Portal that allows creation of related records, then the script is fairly simple. Something along the lines of (as long as there's only one Portal): |
|
Method one: SImple and direct: Create a new table for Term, and simply create a new record for each term, typing the term into the TermName field for the new table. This is easy if you have relatively few different Terms. Method two: Copy the already defined value list of Subject Terms to a text document. You can do this by simply selecting the content of the value list, copying it, and pasting it into a text document. Then import the Text document into a new table. This will create one record for each of the Terms. Method Three: Define a new Term table, and require in the field definition that the values in the TermName field be unique. Then import records from the "old" table into the new table, importing only the Term field. Any of these three methods will produce a new table of Subject Terms, with one term per record, all being unique. |
#5
| |||
| |||
|
|
So, for the purposes of migration you need a repeating field. The following calculation will give you one: GetValue(Extend(X); Get(CalculationRepetitionNumber)) Where "X" is your check box "Terms" field. Just set up your calculation to have a Text result and however many repetitions are required to hold the maximum number of key word terms. The calculation will "break out" the values one per repetition, essentially transforming field X into a repeating field. Then you can import and split the values like you wanted to in the beginning. Good luck! |
#6
| |||
| |||
|
#7
| |||
| |||
|
|
You have FileMaker 8, right? Harry's script is overkill (but probably the only way to do it back in FileMaker 6); and I don't think "Method Three" described by Bill C will actually work. Check boxes put multiple values into a single field, with a carriage return between them. Your initial thought was to "split the repeating fields" which was correct except there wasn't a repeating field to split (which is why FileMaker didn't offer you the option). So, for the purposes of migration you need a repeating field. The following calculation will give you one: GetValue(Extend(X); Get(CalculationRepetitionNumber)) Where "X" is your check box "Terms" field. Just set up your calculation to have a Text result and however many repetitions are required to hold the maximum number of key word terms. The calculation will "break out" the values one per repetition, essentially transforming field X into a repeating field. Then you can import and split the values like you wanted to in the beginning. Good luck! "Helpful Harry" <helpful_harry (AT) nom (DOT) de.plume.com> wrote in message news:261120061910521293%helpful_harry (AT) nom (DOT) de.plume.com... You'll have to use a script that loops through each record creating all the appropriate related records that are needed. The easiest way to create these related records is to use a Portal that allows creation of related records, then the script is fairly simple. Something along the lines of (as long as there's only one Portal): "Bill" <bbcollins (AT) fake (DOT) net> wrote in message news:bbcollins-3027A0.08432126112006 (AT) news (DOT) west.earthlink.net... Method one: SImple and direct: Create a new table for Term, and simply create a new record for each term, typing the term into the TermName field for the new table. This is easy if you have relatively few different Terms. Method two: Copy the already defined value list of Subject Terms to a text document. You can do this by simply selecting the content of the value list, copying it, and pasting it into a text document. Then import the Text document into a new table. This will create one record for each of the Terms. Method Three: Define a new Term table, and require in the field definition that the values in the TermName field be unique. Then import records from the "old" table into the new table, importing only the Term field. Any of these three methods will produce a new table of Subject Terms, with one term per record, all being unique. |
![]() |
| Thread Tools | |
| Display Modes | |
| |