Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

OK, how about this one:

Is there any way to create, in a script, a new find request that has the "omit" box checked...

...without restoring a find request?

Posted

You could do just a regular find and then use the Omit script step.

Chuck

Posted

Only problem with that is that I'm trying to do a multiple find request in a file with over 1000 records. In the find I want to omit all records that don't have a specific text in a specific field. --And I don't want the user to be able to override the omission.

I believe the only way to perform that omission with a script would be to sort over 1000 records by the specific field -with the ineligible records appearing first, count the number ineligible records through an unindexed relationship, and perform an Omit Multiple so that only the eligible records are found--

--or loop through each record, omitting all that are ineligible.

Either method would take far too long to perform, I fear.

Any other ideas?

Thanks,

Dave

Posted

Dave,

Let's see if we can solve this. Can you give me more information about the fields that you are searching on and the find criteria you want to have?

Chuck

Posted

quote:

Originally posted by Dave Bud:

Only problem with that is that I'm trying to do a multiple find request in a file with over 1000 records. In the find I want to omit all records that don't have a specific text in a specific field. --And I don't want the user to be able to override the omission.

Who is controling the find request the program or the users?

If the users are in contol then, this may be difficult, but can still be done. If the program is in contol then this is easy.

Start with a main script:

AllowUserAbort [Off]

SetErrorCapture[On]

GoTo Layout [FindCriteria]

Enter Find Mode[Pause]

I assume that the user either knows how do setup the multiple find requests or you have a button on the screen that creates a new request.

Now, put a button on the layout with a script attached:

AllowUserAbort [Off]

SetErrorCapture[On]

Perform Script [setOmitCriteria]

Perform Find[]

Goto Layout [FindResults]

The script SetOmitCriteria should be something like this:

FreezeWindow

ToggleStatusArea[show]

NewRequest

Omit

SetField[<whatever you are trying to omit>]

<more SetFields as necessary>

This should complete your procedure. Remember that the the "Omit" request is a seperate request from the others and will be performed on the set found.

This might seem complicated and on the surface it is, but it really easy once you do it.

------------------

=-=-=-=-=-=-=-=-=-=-=-=-=

Kurt Knippel

Consultant

Database Resources

mailto:[email protected]

http://www.database-resources.com

=-=-=-=-=-=-=-=-=-=-=-=-=

Posted

Don't forget one VERY important thing. For the omit checkbox to be "checked" in a script, the status area must be set to show. This is even true under script control. e.g.

Toggle Status Area (show)

Enter Find Mode ()

Set Field (Last Name, "Smith")

New Record/Request

Set Field (First Name, "John")

Omit

Perform Find()

This finds all the Smith's, but omits the John Smith's. This will fail if the status area is hidden. -bd

Posted

quote:

Originally posted by stefangs:

interesting topic, since i've dealt with something similar, too. but now is there a way to *uncheck* the omit button with a button when the status area is hidden? i have a button that checks it - but when the user changes his mind, he can't uncheck, can he? he'd have to delete the request, right?

What is the EXACT situation? Is the staus area show to the user? Does the user have control to be able to uncheck the box?

Assuming the status are is shown and the scripting is paused, then the user can either delete the request or simply uncheck the box.

------------------

=-=-=-=-=-=-=-=-=-=-=-=-=

Kurt Knippel

Consultant

Database Resources

mailto:[email protected]

http://www.database-resources.com

=-=-=-=-=-=-=-=-=-=-=-=-=

Posted

interesting topic, since i've dealt with something similar, too. but now is there a way to *uncheck* the omit button with a button when the status area is hidden? i have a button that checks it - but when the user changes his mind, he can't uncheck, can he? he'd have to delete the request, right?

Posted

the exact situation is that the user doesn't see the status bar and its status is locked. in this case, he *can* check the omit button with a button that has [omit] attached, but i guess he *cannot* uncheck it. he'd have to delete the request (?).

This topic is 8808 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
×
×
  • Create New...

Important Information

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