Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5741 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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).

Posted

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.

Posted

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?

Posted (edited)

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 by Guest
Posted

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?

Posted

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.

Posted

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 )

This topic is 5741 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.