dbTalk Databases Forums  

Auto Enter Scheme

comp.databases.filemaker comp.databases.filemaker


Discuss Auto Enter Scheme in the comp.databases.filemaker forum.



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

Default Auto Enter Scheme - 08-01-2012 , 12:47 PM






Hello, FM5 Windows XP
A relationship Invoices::Vehicles allows record creation; uses a number fora match field.

When a new instance of Vehicle is created as above, I would like to have vehicle record auto enter data from a field in the Invoices file using a Vehicles::Invoices relationship that uses the same match fields. So far it won't work, I suspect because of evaluation order.

Thanks,
Bill

Reply With Quote
  #2  
Old   
Helpful Harry
 
Posts: n/a

Default Re: Auto Enter Scheme - 08-01-2012 , 08:29 PM






In article <0e976e29-a65c-4a38-961f-01594ce5fa7a (AT) googlegroups (DOT) com>, bilbod
<bjaynes (AT) montanaport (DOT) net> wrote:
Quote:
Hello, FM5 Windows XP
A relationship Invoices::Vehicles allows record creation; uses a number
for a match field.

When a new instance of Vehicle is created as above, I would like to have
vehicle record auto enter data from a field in the Invoices file using a
Vehicles::Invoices relationship that uses the same match fields. So far
it won't work, I suspect because of evaluation order.
There's an option to only evaluate Auto-enter calculations when the
referenced fields are not empty ... but it tends to be a bit flakey, so I
enforce it within the calculation.

Instead of the Field's auto-enter calucation being something like:

= Invoices:VehicleField

change it to be:

= If (MatchField = "", "", Invoices:VehicleField)

That way the auto-enter calculation remains empty until there is data in
the MatchField (and hopefully then a valid Relationship link) before
retrieving the VehicleFIeld data.

Helpful Harry )

Reply With Quote
  #3  
Old   
E. Appeldoorn
 
Posts: n/a

Default Re: Auto Enter Scheme - 08-02-2012 , 02:10 AM



Hi Bill,

auto enter data works only once, at the creation of the record.
Since at that time no valid relation exists no value will be entered.
You have to do this by script
in your case probably Relookup Field Contents
or
Insert Calculated Result

Ursus

--

"bilbod" schreef in bericht
news:0e976e29-a65c-4a38-961f-01594ce5fa7a (AT) googlegroups (DOT) com...

Hello, FM5 Windows XP
A relationship Invoices::Vehicles allows record creation; uses a number for
a match field.

When a new instance of Vehicle is created as above, I would like to have
vehicle record auto enter data from a field in the Invoices file using a
Vehicles::Invoices relationship that uses the same match fields. So far it
won't work, I suspect because of evaluation order.

Thanks,
Bill

Reply With Quote
  #4  
Old   
Helpful Harry
 
Posts: n/a

Default Re: Auto Enter Scheme - 08-02-2012 , 02:33 AM



In article <jvd95a$2gn$1 (AT) dont-email (DOT) me>, "E. Appeldoorn"
<ursus.kirk (AT) ziggo (DOT) nl> wrote:
Quote:
auto enter data works only once, at the creation of the record.
That's not strictly true, although it is logically how it's meant to work.

If you use a calculation as I provided in another reply, it delays the
auto-enter data ... apparently FileMaker sees the "" data as still being
empty, and continues to try to perform the auto-enter, which the If
statement only allows to happen when there is valid data to use in the
other field(s). That's the only explanation since without the If statement
the auto-enter doesn't work as wanted, but with the If statement it does
work "properly".

This may have been changed / fixed in newer versions of FileMaker Pro
(Bill is using FilMaker Pro 5 anyway), and it may actualy be a bug in the
older Mac versions so may not work under Windows, but I've used it a few
times.

Helpful Harry )

Reply With Quote
  #5  
Old   
bilbod
 
Posts: n/a

Default Re: Auto Enter Scheme - 08-07-2012 , 11:07 AM



Hi Harry,

Thanks so much for looking at this issue. Evidently you've had your own struggles with auto-enter. I did set up a field with your calculation and, so far, won't populate the field.

The match field for a Vehicle on creation by ::invoice file is Vehicle ID in the Vehicle file, right side of relationship. We're after the ::customer ID which is already in ::Invoices, wanting Vehicle to auto enter that in its own Customer ID. So
Customer ID Auto Enters by Calculation as below

Case(

Vehicle ID = "", "", Invoice::New Customer ID

)

Is this what you were suggesting?

Best regards,
Bill

On Wednesday, August 1, 2012 7:29:35 PM UTC-6, Helpful Harry wrote:
Quote:
In article <0e976e29-a65c-4a38-961f-01594ce5fa7a (AT) googlegroups (DOT) com>, bilbod

bjaynes (AT) montanaport (DOT) net> wrote:



Hello, FM5 Windows XP

A relationship Invoices::Vehicles allows record creation; uses a number

for a match field.



When a new instance of Vehicle is created as above, I would like to have

vehicle record auto enter data from a field in the Invoices file using a

Vehicles::Invoices relationship that uses the same match fields. So far

it won't work, I suspect because of evaluation order.



There's an option to only evaluate Auto-enter calculations when the

referenced fields are not empty ... but it tends to be a bit flakey, so I

enforce it within the calculation.



Instead of the Field's auto-enter calucation being something like:



= Invoices:VehicleField



change it to be:



= If (MatchField = "", "", Invoices:VehicleField)



That way the auto-enter calculation remains empty until there is data in

the MatchField (and hopefully then a valid Relationship link) before

retrieving the VehicleFIeld data.



Helpful Harry )

Reply With Quote
  #6  
Old   
E. Appeldoorn
 
Posts: n/a

Default Re: Auto Enter Scheme - 08-07-2012 , 11:18 AM



Since your New Customer ID is never going to change I don't see any reason
to use an Auto Entered Value. Use a normal calculation instead.

ursus


"bilbod" schreef in bericht
news:4f504aac-ace5-450a-86db-48303cce73da (AT) googlegroups (DOT) com...

Hi Harry,

Thanks so much for looking at this issue. Evidently you've had your own
struggles with auto-enter. I did set up a field with your calculation and,
so far, won't populate the field.

The match field for a Vehicle on creation by ::invoice file is Vehicle ID in
the Vehicle file, right side of relationship. We're after the ::customer ID
which is already in ::Invoices, wanting Vehicle to auto enter that in its
own Customer ID. So
Customer ID Auto Enters by Calculation as below

Case(

Vehicle ID = "", "", Invoice::New Customer ID

)

Is this what you were suggesting?

Best regards,
Bill

On Wednesday, August 1, 2012 7:29:35 PM UTC-6, Helpful Harry wrote:
Quote:
In article <0e976e29-a65c-4a38-961f-01594ce5fa7a (AT) googlegroups (DOT) com>, bilbod

bjaynes (AT) montanaport (DOT) net> wrote:



Hello, FM5 Windows XP

A relationship Invoices::Vehicles allows record creation; uses a number

for a match field.



When a new instance of Vehicle is created as above, I would like to have

vehicle record auto enter data from a field in the Invoices file using a

Vehicles::Invoices relationship that uses the same match fields. So far

it won't work, I suspect because of evaluation order.



There's an option to only evaluate Auto-enter calculations when the

referenced fields are not empty ... but it tends to be a bit flakey, so I

enforce it within the calculation.



Instead of the Field's auto-enter calucation being something like:



= Invoices:VehicleField



change it to be:



= If (MatchField = "", "", Invoices:VehicleField)



That way the auto-enter calculation remains empty until there is data in

the MatchField (and hopefully then a valid Relationship link) before

retrieving the VehicleFIeld data.



Helpful Harry )

Reply With Quote
  #7  
Old   
bilbod
 
Posts: n/a

Default Re: Auto Enter Scheme - 08-07-2012 , 12:37 PM



I need the vehicle to pickup the associated customer ID so that it could be used as a right side match field in a Customer::Vehicle relationship to display vehicles in Customers.
Bill

On Tuesday, August 7, 2012 10:18:01 AM UTC-6, E. Appeldoorn wrote:
Quote:
Since your New Customer ID is never going to change I don't see any reason

to use an Auto Entered Value. Use a normal calculation instead.



ursus





"bilbod" schreef in bericht

news:4f504aac-ace5-450a-86db-48303cce73da (AT) googlegroups (DOT) com...



Hi Harry,



Thanks so much for looking at this issue. Evidently you've had your own

struggles with auto-enter. I did set up a field with your calculation and,

so far, won't populate the field.



The match field for a Vehicle on creation by ::invoice file is Vehicle ID in

the Vehicle file, right side of relationship. We're after the ::customer ID

which is already in ::Invoices, wanting Vehicle to auto enter that in its

own Customer ID. So

Customer ID Auto Enters by Calculation as below



Case(



Vehicle ID = "", "", Invoice::New Customer ID



)



Is this what you were suggesting?



Best regards,

Bill



On Wednesday, August 1, 2012 7:29:35 PM UTC-6, Helpful Harry wrote:

In article <0e976e29-a65c-4a38-961f-01594ce5fa7a (AT) googlegroups (DOT) com>, bilbod



bjaynes (AT) mot (DOT) net> wrote:







Hello, FM5 Windows XP



A relationship Invoices::Vehicles allows record creation; uses a number



for a match field.







When a new instance of Vehicle is created as above, I would like to have



vehicle record auto enter data from a field in the Invoices file using a



Vehicles::Invoices relationship that uses the same match fields. So far



it won't work, I suspect because of evaluation order.







There's an option to only evaluate Auto-enter calculations when the



referenced fields are not empty ... but it tends to be a bit flakey, so I



enforce it within the calculation.







Instead of the Field's auto-enter calucation being something like:







= Invoices:VehicleField







change it to be:







= If (MatchField = "", "", Invoices:VehicleField)







That way the auto-enter calculation remains empty until there is data in



the MatchField (and hopefully then a valid Relationship link) before



retrieving the VehicleFIeld data.







Helpful Harry )

Reply With Quote
  #8  
Old   
Helpful Harry
 
Posts: n/a

Default Re: Auto Enter Scheme - 08-08-2012 , 01:31 AM



In article <4f504aac-ace5-450a-86db-48303cce73da (AT) googlegroups (DOT) com>, bilbod
<bjaynes (AT) montanaport (DOT) net> wrote:
Quote:
Hi Harry,

Thanks so much for looking at this issue. Evidently you've had your own
struggles with auto-enter. I did set up a field with your calculation
and, so far, won't populate the field.

The match field for a Vehicle on creation by ::invoice file is Vehicle
ID in the Vehicle file, right side of relationship. We're after the
::customer ID which is already in ::Invoices, wanting Vehicle to auto
enter that in its own Customer ID. So Customer ID Auto Enters by
Calculation as below

Case(

Vehicle ID = "", "", Invoice::New Customer ID

)

Is this what you were suggesting?
Opps! Sorry, that was my mistake (thanks to a cold and a headache, and
still having to go to work - the pitfalls of bein self-employed).

Rather than the MatchField I meant a related field, something like:

If ( Invoice::New Customer ID = "", "", Invoice::New Customer ID )

or

If ( IsEmpty (Invoice::New Customer ID), "", Invoice::New Customer ID )

It could be any related field (including the Invoice::New Customer ID or
the child-side match field), as long as it always has data in it when the
Relationship is valid.

I don't use Case when there's only two options (it's two extra letters to
type for a start ;o) ), but it shouldn't make any difference.

Helpful Harry )

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 - 2013, Jelsoft Enterprises Ltd.