dbTalk Databases Forums  

Modify last found set

comp.databases.filemaker comp.databases.filemaker


Discuss Modify last found set in the comp.databases.filemaker forum.



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

Default Modify last found set - 11-18-2010 , 11:21 AM






FM 10

I have a field with a Value List checkbox (Yes) that allows me to
create a custom found set. I perform a find for those fields with the
value "Yes". How can I create a button that will reset or clear the
"Yes" from this field. I looked at Find/Replace but do not understand
how to script this.

Thanks
Matthew

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

Default Re: Modify last found set - 11-18-2010 , 11:27 AM






To act upon the found set, use the Replace Field Content step on a
button. Or to clear the value from all records where it is set to 'yes'
(regardless of whether the record is in the current found set) you'll
need the button to call a script that finds all records where the value
is 'yes' and then do Replace Field Content (or loop through records with
a Set Field step).

On 11/18/2010 9:21 AM, Buckbuck wrote:

Quote:
I have a field with a Value List checkbox (Yes) that allows me to
create a custom found set. I perform a find for those fields with the
value "Yes". How can I create a button that will reset or clear the
"Yes" from this field. I looked at Find/Replace but do not understand
how to script this.

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

Default Re: Modify last found set - 11-18-2010 , 11:52 AM



On Nov 18, 9:27*am, Howard Schlossberg
<how... (AT) nospam (DOT) fmprosolutions.com> wrote:
Quote:
To act upon the found set, use the Replace Field Content step on a
button. *Or to clear the value from all records where it is set to 'yes'
(regardless of whether the record is in the current found set) you'll
need the button to call a script that finds all records where the value
is 'yes' and then do Replace Field Content (or loop through records with
a Set Field step).

On 11/18/2010 9:21 AM, Buckbuck wrote:



I have a field with a Value List checkbox (Yes) that allows me to
create a custom found set. I perform a find for those fields with the
value "Yes". How can I create a button that will reset or clear the
"Yes" from this field. I looked at Find/Replace but do not understand
how to script this.
When I try this, or some form of your suggestion, the script returns a
notice "The Find/Replace option "Current field" requires a selected
field. I do not understand this.

THanks again

Reply With Quote
  #4  
Old   
Your Name
 
Posts: n/a

Default Re: Modify last found set - 11-18-2010 , 02:40 PM



"Buckbuck" <buck.matthew74 (AT) yahoo (DOT) com> wrote

Quote:
FM 10

I have a field with a Value List checkbox (Yes) that allows me to
create a custom found set. I perform a find for those fields with the
value "Yes". How can I create a button that will reset or clear the
"Yes" from this field. I looked at Find/Replace but do not understand
how to script this.
I'm not sure if you are trying to clear the "Yes" value from the Find
Request (before perfoming the find) or from the Found Set records (after
performing the Find).

If you are wanting to clear the "Yes" from the Find Request, then you'll
need a button which performs a Script with a single command:
Set Field [CheckboxField; ""]


If you are wanting to clear the data from all the Records in the Found Set,
then you can use the same command inside a Script which loops through each
record.
e.g.
Go To Record [First]
Loop
Set Field [CheckboxField; ""]
Go To Record [Next; Exit After Last]
End Loop


You can instead use the Replace command, which basically does the same as
the above using just one command (so should be faster on LARGE numbers of
records, whether it actually is or not, is questionable).
e.g.
Replace [No Dialog; CheckboxField; ""]


NOTE: Whichever way you do it, make sure to BACKUP the database before
testing the Script, and then make sure it does what you want on only the
Records you want. The Replace command can be especially dangerous when used
manually, so always doube / triple check the settings before letting it lose
on your data.


Helpful Harry )

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

Default Re: Modify last found set - 11-18-2010 , 06:39 PM



On 11/18/2010 9:52 AM, Buckbuck wrote:
Quote:
On Nov 18, 9:27 am, Howard Schlossberg
how... (AT) nospam (DOT) fmprosolutions.com> wrote:
To act upon the found set, use the Replace Field Content step on a
button. Or to clear the value from all records where it is set to 'yes'
(regardless of whether the record is in the current found set) you'll
need the button to call a script that finds all records where the value
is 'yes' and then do Replace Field Content (or loop through records with
a Set Field step).

On 11/18/2010 9:21 AM, Buckbuck wrote:

I have a field with a Value List checkbox (Yes) that allows me to
create a custom found set. I perform a find for those fields with the
value "Yes". How can I create a button that will reset or clear the
"Yes" from this field. I looked at Find/Replace but do not understand
how to script this.

When I try this, or some form of your suggestion, the script returns a
notice "The Find/Replace option "Current field" requires a selected
field. I do not understand this.

I suggested using the Replace Field Contents step, not the Find/Replace.
Two totally separate commands. For that command you have to set two
things: (1) the field you want to update, and (2) what you want to
update it with.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg
FM Professional Solutions, Inc. Los Angeles

FileMaker Certified Developer
Associate Member, FileMaker Business 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.