![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, does anyone recommend a nice way to erase the contents of certain field(s) on a record automatically when a specified field has been changed? For example; two fields are named Company and Contact. Select a company, then select a contact from that company. When the company then changes later on, I would like to erase the previous contact name. Thanks, Mark. |
#3
| |||
| |||
|
|
Version not specified. Answer assumes at least FM7. Execute a script on change to a field: EventScripthttp://www.softs4humans.com zippScripthttp://homepage.mac.com/jkornhaus/filemaker/ Either free plugin will do it. ZippScript has the added functionality of scheduling a script to occur after a certain duration or at a specific time. Matt On 02/24/2007 05:53:08 "mgfilemaker" <mgoy... (AT) hotmail (DOT) com> wrote: Hi, does anyone recommend a nice way to erase the contents of certain field(s) on a record automatically when a specified field has been changed? For example; two fields are named Company and Contact. Select a company, then select a contact from that company. When the company then changes later on, I would like to erase the previous contact name. Thanks, Mark. |
#4
| |||
| |||
|
|
Thanks Matt, Sorry, I should have specified FM8.5. Is there any way with built-in FM functionality, or must it be done via third party plug-ins? On 02/24/2007 05:53:08 "mgfilemaker" <mgoy... (AT) hotmail (DOT) com> wrote: Hi, does anyone recommend a nice way to erase the contents of certain field(s) on a record automatically when a specified field has been changed? For example; two fields are named Company and Contact. Select a company, then select a contact from that company. When the company then changes later on, I would like to erase the previous contact name. Thanks, Mark. |
#5
| |||
| |||
|
|
Add an auto-enter calc to the fields you want to clear. For example, the auto-enter calc for the Contact field would be: case(Company = Company, "", Contact) Though I haven't specifically tested this, it should serve to clear the Contact field whenever the Company field changes; otherwise it leaves whatever is already in the COntact field. mgfilemaker wrote: Thanks Matt, Sorry, I should have specified FM8.5. Is there any way with built-in FM functionality, or must it be done via third party plug-ins? On 02/24/2007 05:53:08 "mgfilemaker" <mgoy... (AT) hotmail (DOT) com> wrote: Hi, does anyone recommend a nice way to erase the contents of certain field(s) on a record automatically when a specified field has been changed? For example; two fields are named Company and Contact. Select a company, then select a contact from that company. When the company then changes later on, I would like to erase the previous contact name. Thanks, Mark. |
#6
| |||
| |||
|
|
Add an auto-enter calc to the fields you want to clear. For example, the auto-enter calc for the Contact field would be: case(Company = Company, "", Contact) Though I haven't specifically tested this, it should serve to clear the Contact field whenever the Company field changes; otherwise it leaves whatever is already in the COntact field. mgfilemaker wrote: Thanks Matt, Sorry, I should have specified FM8.5. Is there any way with built-in FM functionality, or must it be done via third party plug-ins? On 02/24/2007 05:53:08 "mgfilemaker" <mgoy... (AT) hotmail (DOT) com> wrote: Hi, does anyone recommend a nice way to erase the contents of certain field(s) on a record automatically when a specified field has been changed? For example; two fields are named Company and Contact. Select a company, then select a contact from that company. When the company then changes later on, I would like to erase the previous contact name. Thanks, Mark. |
#7
| |||
| |||
|
|
I'm not having much luck getting this to work, Howard. Correct me if I am wrong, but an auto-enter calc works upon record creation, or to adjust the value of a field if you manually change the value of that field in an existing record. I can't see where you can get it to care if you change a different field in an existing record. Regardless, in your example, Company will always equal Company. Matt On 02/24/2007 12:08:13 Howard Schlossberg <howard (AT) antispahm (DOT) fmprosolutions.com> wrote: Add an auto-enter calc to the fields you want to clear. For example, the auto-enter calc for the Contact field would be: case(Company = Company, "", Contact) Though I haven't specifically tested this, it should serve to clear the Contact field whenever the Company field changes; otherwise it leaves whatever is already in the COntact field. mgfilemaker wrote: Thanks Matt, Sorry, I should have specified FM8.5. Is there any way with built-in FM functionality, or must it be done via third party plug-ins? On 02/24/2007 05:53:08 "mgfilemaker" <mgoy... (AT) hotmail (DOT) com> wrote: Hi, does anyone recommend a nice way to erase the contents of certain field(s) on a record automatically when a specified field has been changed? For example; two fields are named Company and Contact. Select a company, then select a contact from that company. When the company then changes later on, I would like to erase the previous contact name. Thanks, Mark. |
#8
| |||
| |||
|
|
My bad. As I mentioned, I hadn't actually tested what I wrote...but now I have, and sure enough it needed adjustment. Try it as: Case( // If user is editing contact name, leave whatever they've entered Get(ActiveFieldName) = "Contact"; Contact; // If Company name is modified, then clear the contact name Company = Company; ""; // Otherwise, in case this is ever triggered by something else, // just leave the contact name Contact) Matt Wills wrote: I'm not having much luck getting this to work, Howard. Correct me if I am wrong, but an auto-enter calc works upon record creation, or to adjust the value of a field if you manually change the value of that field in an existing record. I can't see where you can get it to care if you change a different field in an existing record. Regardless, in your example, Company will always equal Company. Matt On 02/24/2007 12:08:13 Howard Schlossberg <how... (AT) antispahm (DOT) fmprosolutions.com> wrote: Add an auto-enter calc to the fields you want to clear. For example, the auto-enter calc for the Contact field would be: case(Company = Company, "", Contact) Though I haven't specifically tested this, it should serve to clear the Contact field whenever the Company field changes; otherwise it leaves whatever is already in the COntact field. mgfilemaker wrote: Thanks Matt, Sorry, I should have specified FM8.5. Is there any way with built-in FM functionality, or must it be done via third party plug-ins? On 02/24/2007 05:53:08 "mgfilemaker" <mgoy... (AT) hotmail (DOT) com> wrote: Hi, does anyone recommend a nice way to erase the contents of certain field(s) on a record automatically when a specified field has been changed? For example; two fields are named Company and Contact. Select a company, then select a contact from that company. When the company then changes later on, I would like to erase the previous contact name. Thanks, Mark. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Howard Schlossberg (818) 883-2846 FM Professional Solutions, Inc. Los Angeles FileMaker 8 Certified Developer Associate Member, FileMaker Solutions Alliance |
![]() |
| Thread Tools | |
| Display Modes | |
| |