![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm new to Filemaker, I have a Contact1 field that holds a buisiness name. Next to that I have a radio button that I want the user to select if Contact1 should also be used as the shipping contact - thus hopefully auto-populating the ShippingContact field. This way the user doesn't have to repeat data entry. Contact1__________ o Use as shipping contact Shipping Contact___________ I think that I should: Make ShippingContact a calculated field, so that it says something like: If Contact1 is selected, then populate ShippingContact with Contact1. I just can't find an example and thus can't figure out how to write the script. Any help is very much appreciated. Thanks. |
#3
| |||
| |||
|
|
A calculation is as simple stating what you want: If a flag indicating you want Contact1 to be the ShippingContact, then make it so. ShippingContact = If ( test ; result1; result2) which translates to ShippingContact = If ( test ; result if test is true; result if test is false) Let's say the radio button is a field named UseContact1, and that the value would be "Y" Your formula for ShippingContact would be ShippingContact = If ( UseContact1 = "Y" ; ShippingContact ; "" ) The problem being that if ShippingContact is a calc dependent on the value of UseContact1, you wouldn't be able to populate it if you DON'T want ShippingContact to be Contact1. You need to leave ShippingContact as an editable Text field. I would do a script which simply sets ShippingContact to the value of Contact1 when the button is clicked. That way, you can put whatever info you want in ShippingContact, still being able to use the button as appropriate. Just one step: Set Field [ ShippingContact ; Contact1 ] Matt In article <1162500172.301696.172750 (AT) h54g2000cwb (DOT) googlegroups.com>, "cat" <cathytyner (AT) gmail (DOT) com> wrote: I'm new to Filemaker, I have a Contact1 field that holds a buisiness name. Next to that I have a radio button that I want the user to select if Contact1 should also be used as the shipping contact - thus hopefully auto-populating the ShippingContact field. This way the user doesn't have to repeat data entry. Contact1__________ o Use as shipping contact Shipping Contact___________ I think that I should: Make ShippingContact a calculated field, so that it says something like: If Contact1 is selected, then populate ShippingContact with Contact1. I just can't find an example and thus can't figure out how to write the script. Any help is very much appreciated. Thanks. |
![]() |
| Thread Tools | |
| Display Modes | |
| |