Newbies mghughes Posted October 18, 2007 Newbies Posted October 18, 2007 Hi all, I am fairly new to FileMaker and I have been tasked with re-doing a GIS application program in FileMaker. So far all is working until now. My problem is that I have farmers who farm specific crops and a data file that contains information related to those crops. I would like to allow each farmer to create a value list on the fly of crops that he grows on the farm, and then add those fields to the table that contains the data via a script. For example: Farmer A grows tomatoes, corn. he enters tomatoes, corn in a portal (or something) to create a value list of tomatoes corn Then I have a base table called Materials - containing chemicals he might use on the farm. The table looks like: ChemName ActiveIngred MaterialType I want to add the fields input into the values list via a script so the file looks like this: ChemName ActiveIngred MaterialType Tomatoes Corn I have no problem doing this in VBScript for my other program but I can't seem to find script steps that actually create tables, fields, etc. etc. Perhaps I am missing something in going from one programming environment to another.... Any help would be appreciated. Thanks.
Fenton Posted October 18, 2007 Posted October 18, 2007 You cannot add fields programically to FileMaker tables. And in this case there is no need to. You would just add the values "Corn" to a field for this in a record in a table, and the value "Tomatoes" to the same field in a new record of that table. The Value List would then [x] Use values from a field. Choose that field. [x] All values. This is a dynamic value list. Maybe your other programs did not have that option, and required hard-coding value lists.
Newbies mghughes Posted October 18, 2007 Author Newbies Posted October 18, 2007 Thank you for your reply - but I wasn't clear enough. There is a reason to add the crop names as fields. The rows in this datatable are all the chemicals the grower uses. The fields are attributes of the chemicals. there is a value that changes for each chemical that is crop-specific as well. In my other program i was able to add the crops as fields and then pick off the specific reentry value for each crop (and chemical). It worked very nicely. I see that I may need to restructure the data tables in FileMaker to get this to work.
Fenton Posted October 18, 2007 Posted October 18, 2007 If you need multiple "crops" for a "chemical" for a grower, then you have 2 choices: 1. Put each on its own line in a field of the chemical record. 1.a. Has the advantage of remaining a stored value, though it is a multi-valued field. 1.b. Because it is a multi-valued field, it can be a PITA to maintain, and worse to report on. 2. Create a little table for the multiple crop values, related to the chemical record. 2.a. The values become "unstored", when viewed from the chemical record. 2.b. You can do anything you want with them though; reports on crops become simpler. 2.c. It's more "Normal" -] [ Actually there are 2 more choices, a repeating field, and multiple fields. Both bad choices.]
Newbies mghughes Posted October 19, 2007 Author Newbies Posted October 19, 2007 Thank you for your responses. I am trying to re-write this application so that the same input files are used in either application environment (GIS and FileMaker). So far everything works fine - I have thought of an inelegant work-around for now to solve my chemical/crop specific issue - however I will give your second suggestion a try - it sounds like the best way to go forward with this.
Recommended Posts
This topic is 6246 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