dbTalk Databases Forums  

Within a Script: Change Perform Find to Constrain Found Set

comp.databases.filemaker comp.databases.filemaker


Discuss Within a Script: Change Perform Find to Constrain Found Set in the comp.databases.filemaker forum.



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

Default Within a Script: Change Perform Find to Constrain Found Set - 01-22-2007 , 01:02 PM






I have to re-work several existing scripts in a medium sized database.
My issue is that I would need to change numerous Perform Find script
steps to Constrain Found Set script steps.
Example of what is there:
Set Error Capture [On]
Show All Records
Perform Find

What I would like to have:
Set Error Capture [On]
Set Field [Table1:ate ; Table2::StartDate & "..." & Table2::EndDate
Constrain Found Set

This way, users can enter the start & stop dates of the report.
Problem, FMPA won't let me copy the Action/Criteria from within the
Perform Find. Do I really have to re-enter all of the actions into the
Constrain by hand? Man, you'd think there would be a way to
change/copy the Perform Find into a Constrain Found Set. Am I missing
something simple? Please someone tell me there is a quick easy way to
do this.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Reality is the leading cause of stress...
....amongst those in touch with it.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
WinXP Pro 64Bit / FMP Adv 8.5v1
VoicesInMyHead
a.k.a. The Voices
No, we're not... Yes, we are...
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


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

Default Re: Within a Script: Change Perform Find to Constrain Found Set - 01-22-2007 , 01:21 PM






Sorry, I don't know of any.

But your post got me thinking that Perform Find may not be necessay. I
think I'll start using just Constrain/Extend in my next project and see
how it goes.

G

VoicesInMyHead wrote:
Quote:
I have to re-work several existing scripts in a medium sized database.
My issue is that I would need to change numerous Perform Find script
steps to Constrain Found Set script steps.
Example of what is there:
Set Error Capture [On]
Show All Records
Perform Find

What I would like to have:
Set Error Capture [On]
Set Field [Table1:ate ; Table2::StartDate & "..." & Table2::EndDate
Constrain Found Set

This way, users can enter the start & stop dates of the report.
Problem, FMPA won't let me copy the Action/Criteria from within the
Perform Find. Do I really have to re-enter all of the actions into the
Constrain by hand? Man, you'd think there would be a way to
change/copy the Perform Find into a Constrain Found Set. Am I missing
something simple? Please someone tell me there is a quick easy way to
do this.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Reality is the leading cause of stress...
...amongst those in touch with it.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
WinXP Pro 64Bit / FMP Adv 8.5v1
VoicesInMyHead
a.k.a. The Voices
No, we're not... Yes, we are...
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


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

Default Re: Within a Script: Change Perform Find to Constrain Found Set - 01-22-2007 , 02:31 PM



Yup. If I am going to Constrain, that's all I use. The example I used
was not a real script, I just typed it out... what it should be more
like is:
Set Error Capture [On]
Enter Find Mode #Blank
Set Field [Table1:ate ; Table2::StartDate & "..." & Table2::EndDate
Perform Find #Blank - but finds date range
Constrain Found Set #What I want to find in the date range

If you don't have a range to find first, it could just be:
Set Error Capture [On]
Show All Records
Constrain Found Set

I just reallllllllly don't want to have to change all the report
scripts that were written without the date range ability - days worth
of changes.

The Voices


Grip wrote:
Quote:
Sorry, I don't know of any.

But your post got me thinking that Perform Find may not be necessay. I
think I'll start using just Constrain/Extend in my next project and see
how it goes.

G

VoicesInMyHead wrote:
I have to re-work several existing scripts in a medium sized database.
My issue is that I would need to change numerous Perform Find script
steps to Constrain Found Set script steps.
Example of what is there:
Set Error Capture [On]
Show All Records
Perform Find

What I would like to have:
Set Error Capture [On]
Set Field [Table1:ate ; Table2::StartDate & "..." & Table2::EndDate
Constrain Found Set

This way, users can enter the start & stop dates of the report.
Problem, FMPA won't let me copy the Action/Criteria from within the
Perform Find. Do I really have to re-enter all of the actions into the
Constrain by hand? Man, you'd think there would be a way to
change/copy the Perform Find into a Constrain Found Set. Am I missing
something simple? Please someone tell me there is a quick easy way to
do this.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Reality is the leading cause of stress...
...amongst those in touch with it.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
WinXP Pro 64Bit / FMP Adv 8.5v1
VoicesInMyHead
a.k.a. The Voices
No, we're not... Yes, we are...
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


Reply With Quote
  #4  
Old   
Remi-Noel Menegaux
 
Posts: n/a

Default Re: Within a Script: Change Perform Find to Constrain Found Set - 01-23-2007 , 04:22 AM



Hi,
Actually there is two mistakes in your find criterion.

One : you can't use 'Set Field( date; Something)' if that 'Something is not
a date ie MM/DD/YYYY. Then you have 2 methods : one is use instead the
'Insert Calculated Result', the other is to make for every date say 'Date1'
a new field say 'Date1N' (calc, number) = Date1 - set as a number and not as
a date (this because FileMaker keeps his dates in form of a number of days
since date 1/1/1). With this last method you can use 'Set Field' with the
datesN fields.

Two : StartDate and EndDate have to be set as globals. If not there are zero
in Find mode.

After having corrected these, you will not need any longer to 'Constrain'
the Found Set.

With Method One, your script will look like :
Enter Find Mode #Blank
Insert Calculated Result [Table1:ate ; Table2::StartDate & "..." &
Table2::EndDate]
Perform Find #Blank

With Method Two, your script will look like :
Enter Find Mode #Blank
Set Field [Table1:ateN ; Table2::StartDateN & "..." & Table2::EndDateN]
Perform Find #Blank

Remi-Noel

"VoicesInMyHead" <voices.imh (AT) gmail (DOT) com> a écrit dans le message de news:
1169497868.920510.88450 (AT) l53g200...oglegroups.com...
Quote:
Yup. If I am going to Constrain, that's all I use. The example I used
was not a real script, I just typed it out... what it should be more
like is:
Set Error Capture [On]
Enter Find Mode #Blank
Set Field [Table1:ate ; Table2::StartDate & "..." & Table2::EndDate
Perform Find #Blank - but finds date range
Constrain Found Set #What I want to find in the date range

If you don't have a range to find first, it could just be:
Set Error Capture [On]
Show All Records
Constrain Found Set

I just reallllllllly don't want to have to change all the report
scripts that were written without the date range ability - days worth
of changes.

The Voices


Grip wrote:
Sorry, I don't know of any.

But your post got me thinking that Perform Find may not be necessay. I
think I'll start using just Constrain/Extend in my next project and see
how it goes.

G

VoicesInMyHead wrote:
I have to re-work several existing scripts in a medium sized database.
My issue is that I would need to change numerous Perform Find script
steps to Constrain Found Set script steps.
Example of what is there:
Set Error Capture [On]
Show All Records
Perform Find

What I would like to have:
Set Error Capture [On]
Set Field [Table1:ate ; Table2::StartDate & "..." & Table2::EndDate
Constrain Found Set

This way, users can enter the start & stop dates of the report.
Problem, FMPA won't let me copy the Action/Criteria from within the
Perform Find. Do I really have to re-enter all of the actions into the
Constrain by hand? Man, you'd think there would be a way to
change/copy the Perform Find into a Constrain Found Set. Am I missing
something simple? Please someone tell me there is a quick easy way to
do this.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Reality is the leading cause of stress...
...amongst those in touch with it.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
WinXP Pro 64Bit / FMP Adv 8.5v1
VoicesInMyHead
a.k.a. The Voices
No, we're not... Yes, we are...
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-




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

Default Re: Within a Script: Change Perform Find to Constrain Found Set - 01-23-2007 , 04:30 AM



I all the script steps are allways the same, create a completely new script
with these steps. Call it [SS] ContrainIT (or whatever) and treat it as a
SubScript.

Then in all the scripts where you need it just replace the current steps you
have with one step: Perform Script <[SS] ConstrainIT>

Ursus

"VoicesInMyHead" <voices.imh (AT) gmail (DOT) com> schreef in bericht
news:1169497868.920510.88450 (AT) l53g2000cwa (DOT) googlegroups.com...
Quote:
Yup. If I am going to Constrain, that's all I use. The example I used
was not a real script, I just typed it out... what it should be more
like is:
Set Error Capture [On]
Enter Find Mode #Blank
Set Field [Table1:ate ; Table2::StartDate & "..." & Table2::EndDate
Perform Find #Blank - but finds date range
Constrain Found Set #What I want to find in the date range

If you don't have a range to find first, it could just be:
Set Error Capture [On]
Show All Records
Constrain Found Set

I just reallllllllly don't want to have to change all the report
scripts that were written without the date range ability - days worth
of changes.

The Voices


Grip wrote:
Sorry, I don't know of any.

But your post got me thinking that Perform Find may not be necessay. I
think I'll start using just Constrain/Extend in my next project and see
how it goes.

G

VoicesInMyHead wrote:
I have to re-work several existing scripts in a medium sized database.
My issue is that I would need to change numerous Perform Find script
steps to Constrain Found Set script steps.
Example of what is there:
Set Error Capture [On]
Show All Records
Perform Find

What I would like to have:
Set Error Capture [On]
Set Field [Table1:ate ; Table2::StartDate & "..." & Table2::EndDate
Constrain Found Set

This way, users can enter the start & stop dates of the report.
Problem, FMPA won't let me copy the Action/Criteria from within the
Perform Find. Do I really have to re-enter all of the actions into the
Constrain by hand? Man, you'd think there would be a way to
change/copy the Perform Find into a Constrain Found Set. Am I missing
something simple? Please someone tell me there is a quick easy way to
do this.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Reality is the leading cause of stress...
...amongst those in touch with it.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
WinXP Pro 64Bit / FMP Adv 8.5v1
VoicesInMyHead
a.k.a. The Voices
No, we're not... Yes, we are...
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-




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

Default Re: Within a Script: Change Perform Find to Constrain Found Set - 01-23-2007 , 07:36 AM



Quote:
Actually there is two mistakes in your find criterion.
No. There are not.

Quote:
One : you can't use 'Set Field( date; Something)' if that 'Something is not
a date ie MM/DD/YYYY....
My fields are dates, and they work just fine.

Quote:
Two : StartDate and EndDate have to be set as globals...
They are. Again, works fine - always has. If you read my post, it
said nothing about anything "not" working. I am simply updating old
search scripts to conform to their growing data needs.

Quote:
After having corrected these, you will not need any longer to 'Constrain'
the Found Set.
There is nothing to correct... and yes: if you are doing a sub-search,
you need to Constrain or Extend your set - if you just do another
Perform Find, FMP looks at ALL records, not the found set (date range
in my example) you are working with.

Thanks anyway?

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Reality is the leading cause of stress...
....amongst those in touch with it.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
WinXP Pro 64Bit / FMP Adv 8.5v1
VoicesInMyHead
a.k.a. The Voices
No, we're not... Yes, we are...
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



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

Default Re: Within a Script: Change Perform Find to Constrain Found Set - 01-23-2007 , 07:40 AM



Good idea! But they are all different. I did about 1/3 of them
between my other work, so a couple more days and it'll be done.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Reality is the leading cause of stress...
....amongst those in touch with it.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
WinXP Pro 64Bit / FMP Adv 8.5v1
VoicesInMyHead
a.k.a. The Voices
No, we're not... Yes, we are...
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Ursus wrote:
Quote:
I all the script steps are allways the same, create a completely new script
with these steps. Call it [SS] ContrainIT (or whatever) and treat it as a
SubScript.

Then in all the scripts where you need it just replace the current steps you
have with one step: Perform Script <[SS] ConstrainIT

Ursus

"VoicesInMyHead" <voices.imh (AT) gmail (DOT) com> schreef in bericht
news:1169497868.920510.88450 (AT) l53g2000cwa (DOT) googlegroups.com...
Yup. If I am going to Constrain, that's all I use. The example I used
was not a real script, I just typed it out... what it should be more
like is:
Set Error Capture [On]
Enter Find Mode #Blank
Set Field [Table1:ate ; Table2::StartDate & "..." & Table2::EndDate
Perform Find #Blank - but finds date range
Constrain Found Set #What I want to find in the date range

If you don't have a range to find first, it could just be:
Set Error Capture [On]
Show All Records
Constrain Found Set

I just reallllllllly don't want to have to change all the report
scripts that were written without the date range ability - days worth
of changes.

The Voices


Grip wrote:
Sorry, I don't know of any.

But your post got me thinking that Perform Find may not be necessay. I
think I'll start using just Constrain/Extend in my next project and see
how it goes.

G

VoicesInMyHead wrote:
I have to re-work several existing scripts in a medium sized database.
My issue is that I would need to change numerous Perform Find script
steps to Constrain Found Set script steps.
Example of what is there:
Set Error Capture [On]
Show All Records
Perform Find

What I would like to have:
Set Error Capture [On]
Set Field [Table1:ate ; Table2::StartDate & "..." & Table2::EndDate
Constrain Found Set

This way, users can enter the start & stop dates of the report.
Problem, FMPA won't let me copy the Action/Criteria from within the
Perform Find. Do I really have to re-enter all of the actions into the
Constrain by hand? Man, you'd think there would be a way to
change/copy the Perform Find into a Constrain Found Set. Am I missing
something simple? Please someone tell me there is a quick easy way to
do this.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Reality is the leading cause of stress...
...amongst those in touch with it.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
WinXP Pro 64Bit / FMP Adv 8.5v1
VoicesInMyHead
a.k.a. The Voices
No, we're not... Yes, we are...
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



Reply With Quote
  #8  
Old   
Remi-Noel Menegaux
 
Posts: n/a

Default Re: Within a Script: Change Perform Find to Constrain Found Set - 01-23-2007 , 09:05 AM



OK, if you say so : I take it for granted.
Maybe it was true only for FMP6.
Sorry to have somewhat disturbed you with apparently inappropriate comments.
Except for the word 'mistake' that you said was not true, I tested what I
said in FM8, so what I proposed works (also).
And I didn't understand that you wanted to do another find after the first
find, which then calls for a 'Constrain' or 'Extend' search.
Fortunately, Ursus gave you a better answer to the question you asked.
Remi-Noel


"VoicesInMyHead" <voices.imh (AT) gmail (DOT) com> a écrit dans le message de news:
1169559384.899337.177140 (AT) v45g20...oglegroups.com...
Quote:
Actually there is two mistakes in your find criterion.

No. There are not.

One : you can't use 'Set Field( date; Something)' if that 'Something is
not
a date ie MM/DD/YYYY....

My fields are dates, and they work just fine.

Two : StartDate and EndDate have to be set as globals...

They are. Again, works fine - always has. If you read my post, it
said nothing about anything "not" working. I am simply updating old
search scripts to conform to their growing data needs.

After having corrected these, you will not need any longer to 'Constrain'
the Found Set.

There is nothing to correct... and yes: if you are doing a sub-search,
you need to Constrain or Extend your set - if you just do another
Perform Find, FMP looks at ALL records, not the found set (date range
in my example) you are working with.

Thanks anyway?

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Reality is the leading cause of stress...
...amongst those in touch with it.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
WinXP Pro 64Bit / FMP Adv 8.5v1
VoicesInMyHead
a.k.a. The Voices
No, we're not... Yes, we are...
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-




Reply With Quote
  #9  
Old   
JC
 
Posts: n/a

Default Re: Within a Script: Change Perform Find to Constrain Found Set - 01-24-2007 , 05:33 PM





On Jan 23, 10:05 am, "Remi-Noel Menegaux" <rnmenegaux_AT_free.fr>
wrote:
Quote:
OK, if you say so : I take it for granted.
Maybe it was true only for FMP6.
Sorry to have somewhat disturbed you with apparently inappropriate comments.
Except for the word 'mistake' that you said was not true, I tested what I
said in FM8, so what I proposed works (also).
And I didn't understand that you wanted to do another find after the first
find, which then calls for a 'Constrain' or 'Extend' search.
Fortunately, Ursus gave you a better answer to the question you asked.
Remi-Noel

"VoicesInMyHead" <voices.... (AT) gmail (DOT) com> a écrit dans le message de news:
1169559384.899337.177... (AT) v45g2000cwv (DOT) googlegroups.com...

Actually there is two mistakes in your find criterion.

No. There are not.

One : you can't use 'Set Field( date; Something)' if that 'Something is
not
a date ie MM/DD/YYYY....

My fields are dates, and they work just fine.

Two : StartDate and EndDate have to be set as globals...

They are. Again, works fine - always has. If you read my post, it
said nothing about anything "not" working. I am simply updating old
search scripts to conform to their growing data needs.

After having corrected these, you will not need any longer to 'Constrain'
the Found Set.

There is nothing to correct... and yes: if you are doing a sub-search,
you need to Constrain or Extend your set - if you just do another
Perform Find, FMP looks at ALL records, not the found set (date range
in my example) you are working with.

Thanks anyway?

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Reality is the leading cause of stress...
...amongst those in touch with it.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
WinXP Pro 64Bit / FMP Adv 8.5v1
VoicesInMyHead
a.k.a. The Voices
No, we're not... Yes, we are...
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
At best; these guys like Remi and Ursus can only "guess' at what you
are doing exactly. For the most part they do a great job. It's hard
to know exactly what your design looks like a couple of thousand miles
away. I would try a little more etiquette in response to these guys
when they can't see into a crystal ball. Their expertise is
invaluable.

JC



Reply With Quote
  #10  
Old   
VoicesInMyHead
 
Posts: n/a

Default Re: Within a Script: Change Perform Find to Constrain Found Set - 01-24-2007 , 06:57 PM



Etiquette? Sorry. I understand fellow developers do not know what I
am updating - I have answered a few questions myself on this forum.
Which is why I take pause when I ask if there is a way to copy actions
from a Find to a Constrain and get someone telling me I made mistakes
on a perfectly running script (which I purposely did not paste the
actual context, but only an example because it runs perfectly),.. then
presume to correct that which is not wrong and completely ignore my
actual question.

Thanks for your opinion JC, but I have a pet peeve of being told I am
wrong when I am not - especially when I never asked for any input on
the issue they told me I was wrong about. It's a fault of mine.
Remember, no one is forced to answer any question from anyone. If you
don't know, are confused about what someone is referring to, or not
involved in the conversation... it can just be skipped. If I am a bit
too harsh for anyone, please feel free to ignore me & all of my voices.
A quote from Dr. Seuss:

Be who you are and say what you feel,
because those who mind don't matter,
and those who matter don't mind.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Reality is the leading cause of stress...
....amongst those in touch with it.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
WinXP Pro 64Bit / FMP Adv 8.5v1
VoicesInMyHead
a.k.a. The Voices
No, we're not... Yes, we are...
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


Quote:
At best; these guys like Remi and Ursus can only "guess' at what you
are doing exactly. For the most part they do a great job. It's hard
to know exactly what your design looks like a couple of thousand miles
away. I would try a little more etiquette in response to these guys
when they can't see into a crystal ball. Their expertise is
invaluable.

JC- Hide quoted text -- Show quoted text -


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.