Jump to content

3 Finds w/ One empty


This topic is 7158 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Me Once again -

I am creating a script to find my finance charges that are due.

My three critieria fields are:

Terms = Payment Plan

Finance Charge >0

Finance Markoff (checkbox - YES) - is checked

What I have so far is

Enter Find Mode

Set Field(Terms, "Payment Plan")

Set Field(Finance Charge, ">0")

Preform Find

This works - my question is how do I have it add the Set Field for my checked box field. I only want it to find the checkboxes that are empty.

Thanks for your help on the final step or steps I need to add.

Link to comment
Share on other sites

Hi you again,

If you have a layout with all your fields on (which is recommended as you can then go to that layout to do any specific finds (especially if you need to insert a calculated result or do a replace command),

go to that layout when performing your find.

then just add Set Field(Finance Markoff, "=") within your find routine.

= on its own finds empty

Link to comment
Share on other sites

This script was working great.

But - now my setfield (Finance Markoff,"=") is not working.

If I take away the two setfield script steps - the script works fine. But the minute I add them back in - it says there is nothing that matches the criteria. But - I can do the find manually and get what I need.

Help.

Link to comment
Share on other sites

"But - now my setfield (Finance Markoff,"=") is not working."

Shall we assume that you have inserted (temporarily) a pause and confirmed that the "=" in fact is being set in the field Markoff?

Also, have you received the edit script window which asks if you want to keep or replace? Did you check replace after you made changes?

Link to comment
Share on other sites

  • 2 weeks later...

Well - I am finally back to this issue.

I am try to find a set of criteria in a script based on these script lines

Set field(Terms, "Payment Plan")

Insert Calculated Result(Select, "PPFC",">0")

Insert Calculated Result(FCMarkOff,"=")

The first two above find exactly what I want, but the minute I add the third criteria - it finds nothing.

The third field is a checkbox and I want it to be empty - that's why the "=". I have tried making that line a SetField line, but that doesn't work either and I also make sure and do a replace at the end of creating my script - when it is "saving" the features I created.

What else do you suggest?

Thanks -

Link to comment
Share on other sites

Amysmom,

"What else do you suggest?"

Lets attack this from a different direction. You want to find specific criteria in the first 2 fields, but then omit the "Yes" associated with the FCMarkOff field? Try this script:

Go to Layout ["a layout with the 3 fields on it"]

Enter Find Mode []

Set Field ["Terms", ""Payment Plan""]

Insert Calculated Result(Select, "PPFC",">0")

New Record/Request

Set Field ["FCMarkOff",""Yes""]

Omit Record

Perform Find []

Go to Layout [Original layout]

Make sure that none of the boxes are checked in both of the Find script steps.

Instead of looking for records with nothing in the FCMarkOff field, this script will omit records which have a "Yes" in there - same result.

Russ Baker

Canberra, Australia

The Land of TWOGM

[ March 21, 2002, 08:17 PM: Message edited by: Russell Baker ]

Link to comment
Share on other sites

Russ

You have just demonstrated how to script the OMIT box in a find request. That's been my Holy Grail for years.

Wow. Thanks.

You just got a ***** rating from me!

[ March 18, 2002, 09:18 PM: Message edited by: Vaughan ]

Link to comment
Share on other sites

Vaughan,

Thanks for your kind words....

Although I have been using this for a while having stumbled across it while playing around one day, I guess I can't claim credit for it. Its not in the FileMaker manual but it is loosely referred to in the online help under "Omit Script Step". A better explanation is found in Rich Coulombre and Jonathan Price's "Using FileMaker Pro5 Special Edition" pp475.

The guts of this step is that you must be in a Find state within the script for it to behave like the Omit check box in the status area. If you are not, then it behaves like a normal Omit Record menu command.

Russ

Link to comment
Share on other sites

quote:

Originally posted by Mark Dore:

Beware - the OMIT script step only works if the STATUS PANEL is on display.

That one drove me up the wall for a whole day once !

Not true.

I have a DB that never displays the status panel; in the "FindMode" layout I have an "Omit" checkbox that users can use in place of the box in the status panel. The script uses the "Omit Record" step for each find request in which that box is checked (it also clears the box before performing the find, but that's beside the point).

It works perfectly.

Link to comment
Share on other sites

I've been using the Find/Omit script step for years, with and without the status panel. This article does mention that if the status area is hidden AND LOCKED the script won't work. Maybe that was your problem, M. Dore.

BTW, here's a really nice article on "intermediate scripting techniques."

Link to comment
Share on other sites

Russell -

Thank you - that seemed to have fixed my find. Still find it strange that it was working before and then it stopped. But I won't complain.

And glad I got a little discussion going and was able to get some ideas out to others as well.

Have a great day

Link to comment
Share on other sites

This topic is 7158 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.