dbTalk Databases Forums  

FM7 field locking if not empty

comp.databases.filemaker comp.databases.filemaker


Discuss FM7 field locking if not empty in the comp.databases.filemaker forum.



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

Default FM7 field locking if not empty - 11-06-2005 , 05:04 PM






Hey all,

I know this has been covered before, but I'm trying to find an elegant
solution to an "enter only once" type of field. I am trying to use the
script parameter to make this a little easier. Basically I'm trying a
variation of:

If (IsEmpty[TheField])
Go To TheField
End If

But if I could only write one script and use the script parameter to pass
along the field name...

If (IsEmpty[Get(ScriptParameter)]
Go To Get(ScriptParameter)
End If

There are many problems with this I know, but does anyone have an answer?

Eide



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

Default Re: FM7 field locking if not empty - 11-07-2005 , 09:33 PM






Assuming all your fields are in the tab order you can go to the first
field, then loop until you get to the field that your looking for by
comparing script parameter to Get ( ActiveFieldName )
I would recommend trapping for an endless loop.


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

Default Re: FM7 field locking if not empty - 11-07-2005 , 11:08 PM



In article <1131420806.528905.199690 (AT) g44g2000cwa (DOT) googlegroups.com>,
ab (AT) pottnerconsulting (DOT) ca says...
Quote:
Assuming all your fields are in the tab order you can go to the first
field, then loop until you get to the field that your looking for by
comparing script parameter to Get ( ActiveFieldName )
I would recommend trapping for an endless loop.
I *think* if you just set 'go to field' WITHOUT specifying a destination
field it will go to the right field.

At least it used to work like that.

I had an app where I made 5 each an "invisible button" that would clear
each of 5 fields if the user clicked on any of them, and then put the
user in the field they selected.

So my script was:

set field A=blank
...
set field E=blank
go to field

And it worked. The script put the cursor in the field that that the user
clicked on.

I'm not sure if this will work with a separate "invisible button" over
top of the field, or maybe you have to assign the button directly to the
field itself... but play around a bit... it will work.

The key is to -not- specify a destination field in the goto field step.



Reply With Quote
  #4  
Old   
Eide
 
Posts: n/a

Default Re: FM7 field locking if not empty - 11-08-2005 , 09:35 PM



I've tried a few things without much success.

How about using Get(RecordModificationCount) ? If the record has been
modified more than once a dialog would pop up.
With an invisible field over the protected areas as a button that's valid if
a relationship is valid?
I just can't remember how to make the field valid/invalid with a
relationship.

Thanks again,

Eide

"Eide" <news (AT) TAKEOUToldbranch (DOT) com> wrote

Quote:
Hey all,

I know this has been covered before, but I'm trying to find an elegant
solution to an "enter only once" type of field. I am trying to use the
script parameter to make this a little easier. Basically I'm trying a
variation of:

If (IsEmpty[TheField])
Go To TheField
End If

But if I could only write one script and use the script parameter to pass
along the field name...

If (IsEmpty[Get(ScriptParameter)]
Go To Get(ScriptParameter)
End If

There are many problems with this I know, but does anyone have an answer?

Eide





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.