March 5, 200916 yr I'm using a radio button to select record from one or more matching records from a related table. So far, simple. Now, when I mass import data from CSV or merge format, and visit the record for the first time, none of the radio button is selected. I want FM to pick the first button (or it doesn't really matter which) and just go ahead until I change the selection manually. The thing is that I use this radio button to select which related file to display on the browser. This part is used just for the display/browser functionality and it doesn't affect the value of the stored data in the table. I'd rather see one file displayed automatically than having to choose one before anything shows up, since majority of the records have only one matching record (thereby there is only one option to choose from anyway).
March 5, 200916 yr A "radio button" will show if one of the values in its field matches a value in its value list. Its values are (if multiple) separated by returns. So it matters very much what its value is. A blank field cannot show as if a value was chosen; this is not HTML.
March 5, 200916 yr Author Thanks Fenton, but as I indicated above, this radio button chooses one of the maching related records, and there usually is at least one match. I want FMP to pick one (any) as the default, and as you said, I can't make FMP to "auto enter" any of the matched records. If I were to do this by a script, how would I do it?
March 5, 200916 yr I can't make FMP to "auto enter" any of the matched records. Why not? An auto-entry of related::field should enter the data from the first related record (provided auto-entry is enabled during import). Alternatively, running Replace Field Contents… immediately following the import should produce the same result Edited March 5, 200916 yr by Guest
March 5, 200916 yr comment is right (as usual). It will populate when you Import new records. I was somehow thinking of Import matching (where is will not, unless you trigger it with a local field). But in this case it would already have a value. I guess the question now is, how did you do it so it would not work?
March 6, 200916 yr Author Comment and Fenton, You guys are awesome. Problem solved. (But that's just my first problem... so please remember me on the other threads...) I was testing with the previously imported data, and didn't really test importing new data, as I already have a lot of stuff that needs to be filled with default values before I invest more work in it. "Replace Field Contents" seems to work on the entire table, not just the selected record. That is actually good, but does it affect the stuff that were already in there? The thing is that I mass-import many records from csv or merge files, in two tables, every week. The database will have a lot of stuff in it, but some 100 records will be added weekly. If importing adds the default values automatically, that's great, but I think that will depend on the order of importing (referenced table must be there first, I'd assume) and I just want to have a way to rectify if I import them in a wrong order.
March 6, 200916 yr Replace Field Contents works on the found set, not the entire table. Immediately after import, the found set will include only records that were imported (or updated). For those, the existing contents of the field will definitely be affected (it says "replace" and it means just that). No undo, either. If you like, you can add another layer of protection by replacing with a calculated result along the lines of: Case ( IsEmpty ( ThisField ) ; Related::Field ; ThisField )
March 6, 200916 yr Author Thanks - you actually answered questions I haven't asked and actually learned more. This case is now closed!
Create an account or sign in to comment