dbTalk Databases Forums  

Auto clearing fields

comp.databases.filemaker comp.databases.filemaker


Discuss Auto clearing fields in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
mgfilemaker
 
Posts: n/a

Default Auto clearing fields - 02-24-2007 , 04:53 AM






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.


Reply With Quote
  #2  
Old   
Matt Wills
 
Posts: n/a

Default Re: Auto clearing fields - 02-24-2007 , 04:58 AM






Version not specified. Answer assumes at least FM7.

Execute a script on change to a field:

EventScript http://www.softs4humans.com

zippScript http://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" <mgoyeah (AT) hotmail (DOT) com> wrote:

Quote:
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.

Reply With Quote
  #3  
Old   
mgfilemaker
 
Posts: n/a

Default Re: Auto clearing fields - 02-24-2007 , 05:14 AM



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?

Thanks, Mark.

On Feb 24, 9:58 pm, Matt Wills <I... (AT) witz (DOT) end> wrote:
Quote:
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.



Reply With Quote
  #4  
Old   
Howard Schlossberg
 
Posts: n/a

Default Re: Auto clearing fields - 02-24-2007 , 11:08 AM



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:
Quote:
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


Reply With Quote
  #5  
Old   
Howard Schlossberg
 
Posts: n/a

Default Re: Auto clearing fields - 02-24-2007 , 11:11 AM



And I should have added that the option on the auto-enter calc to
(paraphrasing) 'do not replace field contents if not empty' should not
be marked. In other words, you want to allow it to replace field
contents to update itself.

Howard Schlossberg wrote:
Quote:
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


Reply With Quote
  #6  
Old   
Matt Wills
 
Posts: n/a

Default Re: Auto clearing fields - 02-25-2007 , 07:24 AM



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:

Quote:
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.

Reply With Quote
  #7  
Old   
Howard Schlossberg
 
Posts: n/a

Default Re: Auto clearing fields - 02-25-2007 , 12:46 PM



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:
Quote:
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.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Professional Solutions, Inc. Los Angeles

FileMaker 8 Certified Developer
Associate Member, FileMaker Solutions Alliance


Reply With Quote
  #8  
Old   
mgfilemaker
 
Posts: n/a

Default Re: Auto clearing fields - 03-03-2007 , 03:59 AM



Thanks for the help guys, Mark.


On Feb 26, 5:46 am, Howard Schlossberg
<how... (AT) antispahm (DOT) fmprosolutions.com> wrote:
Quote:
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



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.