How to use a calculation to change an associated ID field

General support questions.
PostPosted: Fri Jun 10, 2005 4:26 pm
I had seen this done, but was unsure on how to accomplish it.

I had seen a gentleman setup a Calc field with a drop down in FM7 that allowed the ID field which was associated with it to be changed as soon as the calculation drop down was selected.

I wasn't totally sure how this was done, although the drop down had the ID field in it.

There were no hidden buttons used that I can speak of, nor were there any scripts that ran once this item was clicked on.

Can anyone help? This sounds like a relatively new feature from FM7 and I would like to learn how it works.

-Alex
Posts: 46
Joined: Thu Aug 19, 2004 6:33 pm
Location: Minneapolis, MN
PostPosted: Sat Jun 11, 2005 8:08 am
If the ID field was part of the value list, then it's likely that there was a hidden ID field underneath the text field. With the text field opaque and having the field behavior set to not allow entry, then clicking on it will activate the hidden field in the back, which has the value list attached.

The text field then is either a related field, or a lookup, that changes based on the ID field.
PostPosted: Sat Jun 11, 2005 10:51 am
It's likely there was a hidden field but there was no hidden field. Not unless there was some alteration in program that would not allow a grouping to be seen.

I suppose that is somehow possible though.


-Alex
Posts: 46
Joined: Thu Aug 19, 2004 6:33 pm
Location: Minneapolis, MN
PostPosted: Sat Jun 11, 2005 3:08 pm
I think I've worked out how it must have been done.

The target field has an auto enter calc set to replace its value with the related text value (replacing the ID that gets selected in the VL.) The auto-enter calc must have the option to "Do not replace existing value" turned off (this IS new in FM7.)

This needs a relationship from the target field to the primary ID in the other table (used to pull in the text value.) Then another relationship from the target field to the related text value so that another local ID field can be populated (this is important to keep the relationship intact should the text values change.) The looked up ID can then be used as the key for additional relationships.

You would need to be cautious with this method that the text values in the related table are unique, so the IDs lookup correctly.

Return to General Support

Who is online

Users browsing this forum: No registered users and 3 guests

(855) SEEDCODE
[email protected]
Follow us: