Jump to content

The Impossible


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

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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 (?).

Link to comment
Share on other sites

This topic is 8586 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.