dbTalk Databases Forums  

Frustration with auto-enter fields

comp.databases.filemaker comp.databases.filemaker


Discuss Frustration with auto-enter fields in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
audleman@quasika.net
 
Posts: n/a

Default Frustration with auto-enter fields - 08-23-2005 , 12:55 PM






Hi everybody,

I'm having trouble getting an auto-enter field to work properly.
Basically, I want a text field that will auto-fill with a single word
and never change. I am using this as a way to filter a portal; I have a
'Contacts' table that connects to a 'Contacts Log' table by userID, and
I want to filter out just the "Phone Call" entries.

I have tried creating:

1.A global text field, g_PhoneCall, that I set by hand. Problem here is
the value seems to occasionally erase itself (possibly due to the
multi-user environment?)

2. A global text field with "auto-enter" of value "Phone Call". The
value remains blank until I create a new record. I don't understand the
impact this will have. If I manually create a record to perform the
auto-fill, will it stay set forever? Or do I have to worry about it not
being set on various client machines?

3. A calculation field with value "Phone Call". Same as 2., it only
fills when I create a new record.

Any clarification of how these different options work would be much
appreciated.

Kevin


Reply With Quote
  #2  
Old   
Dan
 
Posts: n/a

Default Re: Frustration with auto-enter fields - 08-23-2005 , 01:15 PM






Hi Kevin

Could you set the value in an opening script?

audleman (AT) quasika (DOT) net wrote:
Quote:
Hi everybody,

I'm having trouble getting an auto-enter field to work properly.
Basically, I want a text field that will auto-fill with a single word
and never change. I am using this as a way to filter a portal; I have
a 'Contacts' table that connects to a 'Contacts Log' table by userID,
and I want to filter out just the "Phone Call" entries.

I have tried creating:

1.A global text field, g_PhoneCall, that I set by hand. Problem here
is the value seems to occasionally erase itself (possibly due to the
multi-user environment?)

2. A global text field with "auto-enter" of value "Phone Call". The
value remains blank until I create a new record. I don't understand
the impact this will have. If I manually create a record to perform
the auto-fill, will it stay set forever? Or do I have to worry about
it not being set on various client machines?

3. A calculation field with value "Phone Call". Same as 2., it only
fills when I create a new record.

Any clarification of how these different options work would be much
appreciated.

Kevin
--
Dan
Using
FMP7.03, WinXP SP2




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

Default Re: Frustration with auto-enter fields - 08-23-2005 , 01:18 PM



audleman (AT) quasika (DOT) net wrote:
Quote:
I'm having trouble getting an auto-enter field to work properly.
Basically, I want a text field that will auto-fill with a single word
and never change. I am using this as a way to filter a portal; I have a
'Contacts' table that connects to a 'Contacts Log' table by userID, and
I want to filter out just the "Phone Call" entries.

I have tried creating:

1.A global text field, g_PhoneCall, that I set by hand. Problem here is
the value seems to occasionally erase itself (possibly due to the
multi-user environment?)
A global field is not effected by other users; it is unique for each
user's session. If it is erasing itself, then it is either not set as a
global, or it has an auto-enter option turned on.

If you are setting the global with a script, then it should never clear
itself out during your session. If you are not actually the host of the
file (you are a guest of FM Server or of another peer-to-peer user),
then the info in the global field will not be there when you close
FileMaker and re-open, and other users will not see it. Best thing is
to use a Set Field step to set it in your start-up script.


Quote:
2. A global text field with "auto-enter" of value "Phone Call". The
value remains blank until I create a new record. I don't understand the
impact this will have. If I manually create a record to perform the
auto-fill, will it stay set forever? Or do I have to worry about it not
being set on various client machines?
If it is a global field you are using to do your portal filtering, then
I would stay away from any auto-entering. Either use Set Field in your
opening script (as above), or else:

Open Filemaker on your machine as the *host* and set the global and then
put it back on your server. Now the field will already be filled in
whenever any guests open it.


Quote:
3. A calculation field with value "Phone Call". Same as 2., it only
fills when I create a new record.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Pro Solutions Los Angeles, California

FileMaker 7 Certified Developer
Associate Member, FileMaker Solutions Alliance


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

Default Re: Frustration with auto-enter fields - 08-23-2005 , 03:57 PM



In article <1124819704.164926.61830 (AT) z14g2000cwz (DOT) googlegroups.com>,
"audleman (AT) quasika (DOT) net" <audleman (AT) quasika (DOT) net> wrote:
Quote:
2. A global text field with "auto-enter" of value "Phone Call". The
value remains blank until I create a new record. I don't understand the
impact this will have. If I manually create a record to perform the
auto-fill, will it stay set forever? Or do I have to worry about it not
being set on various client machines?

3. A calculation field with value "Phone Call". Same as 2., it only
fills when I create a new record.
I'm guessing you're using FileMaker 7 since older versions don't have
auto-enter options for Global fields, and since it is FM 7 this may be
incoorrect, but ...

Auto-enter options are only "run" when a record is created, so you WILL
only get the value in new records. For existing records you'll have to
set the field's value manually or using the Replace option (VERY
carefully - make a backup first!) found in the Records menu.



Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


Reply With Quote
  #5  
Old   
audleman@quasika.net
 
Posts: n/a

Default Re: Frustration with auto-enter fields - 08-23-2005 , 05:26 PM



Wow, it seems crazy that there's not a simple way of doing this.

The advice I got is to set the field in a startup script. What about
the option of using a global Calculation field with the value "Phone
Call"? It seems like once I create a single record (which I've already
done) this field will contain the text string. Is there some way in
which this is a worse option than using a startup script?


Reply With Quote
  #6  
Old   
Dan
 
Posts: n/a

Default Re: Frustration with auto-enter fields - 08-24-2005 , 07:03 AM



I believe your comment about auto-enter calculations is correct - in
many circumstances they are more powerful than calculations.

However, try the following experiment. Create a new table "Global" with
one global text field "g_Text" and define an Auto--enter calculation on
g_text (replace existing value) which is If(IsEmpty(g_Text):"Phone
Call";"Phone Call"). That should ensure that g_text contains "Phone
Call" under all circumstances - but it doesn't. If you look at the
layout that FMP7 sets up when you create a new table you will find an
*empty* g_text field sitting in it. You can enter text into this field
and the instant that you do the Auto-enter calculation fires. Equally if
you create a record in the Global tables it fires. But as far as I can
tell it doesn't fire unless you either create a record or enter data
into it. If you delete the record so that the table is back to no
records the g_text value is still there and the Auto-enter is still
working.

it is not surprising that Kevin is frustrated because frankly this
behaviour is bizarre. The whole concept of a field separate from the
record set but attached to a table is a bit bizarre. I think the problem
is that when you have used FMP for a while you begin to think it is
normal! but there is no denying it is useful.


Martin Trautmann wrote:
Quote:
On Wed, 24 Aug 2005 08:57:00 +1200, Helpful Harry wrote:
Auto-enter options are only "run" when a record is created, so you
WILL only get the value in new records. For existing records you'll
have to set the field's value manually or using the Replace option
(VERY carefully - make a backup first!) found in the Records menu.

Are you sure? So how could the checkbox make sense to override field
contents?

To my knowledge an auto enter fields works very much as the former
lookup fields, while you may use auto enter now recursively, checking
its own contents.

Thus auto-enter may be performed whenever one of the used fields (for
auto-enter by calculation) is changed.

For that reason an auto-enter field may be even more powerful than a
calculation field.

- Martin
--
Dan
Using
FMP7.03, WinXP SP2




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

Default Re: Frustration with auto-enter fields - 08-24-2005 , 04:16 PM



In article <slrndgojts.sm3.t-use (AT) ID-685 (DOT) user.individual.de>, Martin
Trautmann <t-use (AT) gmx (DOT) net> wrote:

Quote:
On Wed, 24 Aug 2005 08:57:00 +1200, Helpful Harry wrote:

Auto-enter options are only "run" when a record is created, so you WILL
only get the value in new records. For existing records you'll have to
set the field's value manually, via a script or using the Replace option
(VERY carefully - make a backup first!) found in the Records menu.

Are you sure? So how could the checkbox make sense to override field
contents?

To my knowledge an auto enter fields works very much as the former
lookup fields, while you may use auto enter now recursively, checking
its own contents.

Thus auto-enter may be performed whenever one of the used fields (for
auto-enter by calculation) is changed.

For that reason an auto-enter field may be even more powerful than a
calculation field.
I'm positive that this is how auto-enter fields work, before Filemaker
7 anyway.

Normal fields using "auto-enter" options (whether that's data,
calculation, lookup, etc.) only get their data when the record is
created ... OR by a bit of trickery, when the fields they're based on
get data. Obviously this last option doesn't work when using the Data
option, since that's hard-coded into the field's definition.

These fields can have this initial data over-ridden / changed by later
data entered by the user, a script, etc., but it can't change
automatically simply when any of the fields it's based on are changed -
that's what Calculation fields are for.

For Filemaker 7 and onwards, I have no real idea, but such a drastic
change in the ability would break quite a few existing databases so I
doubt it's changed THAT much.







Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


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

Default Re: Frustration with auto-enter fields - 08-24-2005 , 04:57 PM



I cannot say what the situation was in earlier versions than 7 but I can
say that Auto-enter is really too mild a description for what is
possible now. Auto-update would be a better name in some cases..

A simple example put on a forum by "Queue" demonstrating conversion from
inches to centimeters and vice-versa was the trigger as far as I was
concerned

Make Cent a number with an auto-enter calculation, and 'do not replace
existing value' deselected, of

If( Get(ActiveFieldName) = "Inch"; 2.54 * Inch; Cent )

Similarly, make Inch an auto-enter calc, with 'do not replace existing
value' deselected, of

If( Get(ActiveFieldName) = "Cent"; Cent / 2.54; Inch ) .

Enter a value into one of these fields and it is automatically converted
into the other.

I've extended this idea in one of my solutions to do auto-updating
calculations between Net, Tax,Gross and including taking into account
TaxRate changes; but the possibilities are endless.

H6elpful Harry wrote:
Quote:
In article <slrndgojts.sm3.t-use (AT) ID-685 (DOT) user.individual.de>, Martin
Trautmann <t-use (AT) gmx (DOT) net> wrote:

On Wed, 24 Aug 2005 08:57:00 +1200, Helpful Harry wrote:

Auto-enter options are only "run" when a record is created, so you
WILL only get the value in new records. For existing records
you'll have to set the field's value manually, via a script or
using the Replace option (VERY carefully - make a backup first!)
found in the Records menu.

Are you sure? So how could the checkbox make sense to override field
contents?

To my knowledge an auto enter fields works very much as the former
lookup fields, while you may use auto enter now recursively, checking
its own contents.

Thus auto-enter may be performed whenever one of the used fields (for
auto-enter by calculation) is changed.

For that reason an auto-enter field may be even more powerful than a
calculation field.

I'm positive that this is how auto-enter fields work, before Filemaker
7 anyway.

Normal fields using "auto-enter" options (whether that's data,
calculation, lookup, etc.) only get their data when the record is
created ... OR by a bit of trickery, when the fields they're based on
get data. Obviously this last option doesn't work when using the Data
option, since that's hard-coded into the field's definition.

These fields can have this initial data over-ridden / changed by later
data entered by the user, a script, etc., but it can't change
automatically simply when any of the fields it's based on are changed
- that's what Calculation fields are for.

For Filemaker 7 and onwards, I have no real idea, but such a drastic
change in the ability would break quite a few existing databases so I
doubt it's changed THAT much.







Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships
;o)
--
Dan
Using
FMP7.03, WinXP SP2




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

Default Re: Frustration with auto-enter fields - 08-24-2005 , 11:19 PM



In article <FfydneGHPr2ncJHeRVnyjQ (AT) brightview (DOT) com>, "Dan"
<dan (AT) owlsnet (DOT) co.uk> wrote:

Quote:
I cannot say what the situation was in earlier versions than 7 but I can
say that Auto-enter is really too mild a description for what is
possible now. Auto-update would be a better name in some cases..

A simple example put on a forum by "Queue" demonstrating conversion from
inches to centimeters and vice-versa was the trigger as far as I was
concerned

Make Cent a number with an auto-enter calculation, and 'do not replace
existing value' deselected, of

If( Get(ActiveFieldName) = "Inch"; 2.54 * Inch; Cent )

Similarly, make Inch an auto-enter calc, with 'do not replace existing
value' deselected, of

If( Get(ActiveFieldName) = "Cent"; Cent / 2.54; Inch ) .

Enter a value into one of these fields and it is automatically converted
into the other.

I've extended this idea in one of my solutions to do auto-updating
calculations between Net, Tax,Gross and including taking into account
TaxRate changes; but the possibilities are endless.
OK, so you enter a Cent data value and Inch auto-enter the converted
value ... BUT, what happens if you the change the value of Cent (or
Inch for that matter)??

In pre-7 versions of FileMaker the auto-enter field would stay with the
original value.

If in version 7 they can now alter their own values (presumably
user-definable to allow compatibility with older versions) when the
source field changes, then they're sort of a cross between normal
fields and Calculation fields - they automatically change if the source
field changes, but can also be manually entered into. That is useful in
some situations (in pre-7 versions you have to do a workaround), but it
makes pure Calculation fields a bit redundant - you would simply use
one of these new-fangled "auto-update" fields and turn off the 'allow
changes' option.



Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


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

Default Re: Frustration with auto-enter fields - 08-24-2005 , 11:47 PM



Helpful Harry wrote:
Quote:
In article <FfydneGHPr2ncJHeRVnyjQ (AT) brightview (DOT) com>, "Dan" <dan (AT) owlsnet (DOT) co.uk> wrote:

Enter a value into one of these fields and it is automatically converted
into the other.

I've extended this idea in one of my solutions to do auto-updating
calculations between Net, Tax,Gross and including taking into account
TaxRate changes; but the possibilities are endless.

OK, so you enter a Cent data value and Inch auto-enter the converted
value ... BUT, what happens if you the change the value of Cent (or
Inch for that matter)??

In pre-7 versions of FileMaker the auto-enter field would stay with the
original value.

If in version 7 they can now alter their own values (presumably
user-definable to allow compatibility with older versions) when the
source field changes, then they're sort of a cross between normal
fields and Calculation fields - they automatically change if the source
field changes, but can also be manually entered into. That is useful in
some situations (in pre-7 versions you have to do a workaround), but it
makes pure Calculation fields a bit redundant - you would simply use
one of these new-fangled "auto-update" fields and turn off the 'allow
changes' option.
This is exactly the discussion going on in another group I belong to:
"can auto-enter calcs replace true calcs". Jury's still out on this,
but probably not. Just like a stored calc, an auto-enter calc requires
one of its field parameters to change in order to trigger the calc
itself to change. So if you have a calc of:

case(a=b+c, d, e)
then a, b or c would need to change in order for the new value of either
d or e to fill in. But if you want the calc to update when 'f' changes,
then you need to include 'f' in the calc, something like:

case(f="Never", "Nothing", a=b+c, d, e)
This will always force itself to re-evaluate whenever f changes,
assuming that f will never be equal to "Never". If f changes and it is
something other then "Never", then it will evaluate a=b+c and result in
either d or e.

There are other tricks to getting around the trigger problem, to have
the calc re-evaluate itself every time the record is committed, for
example, by having it evaluate the 'last modified time'.

So in this way, an auto-enter calc can behave just like a stored calc
field, and almost like a lookup field. With the LookupNext() function,
it can behave exactly like a lookup field.

A benefit to the auto-enter calc over a regular stored calc is that the
auto-enter can contain the value of related fields. But like a stored
calc, an auto-enter calc cannot be triggered by a related field as its
parameter. In other words, the related value can be part of the result,
but changes to the related field itself will not trigger the calc to
refresh, even if that related field is part of the parameter.

Hope this is all somewhat enlightening to someone...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Pro Solutions Los Angeles, California

FileMaker 7 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.