Jump to content

Find within a ind


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

Recommended Posts

Here's a fun one. I have a database of cases that are referred for action. One of the fields is text field with the names of the persons that are handling the case associted to a value list. There is another calculated text field that contians the values OPEN, CLOSED, DUE, LATE or the field is empty. The values are established by some mathematics based on dates and elapsed time.

My customer wants to see reports for each individual that she can give to the individual. Basically its a listing each status code for each person. Hence the dropdown for the name and the status. This was easy to accomplish.

But one that isn't so easy is to get a report for an individual of all the records that do not have CLOSED in the status field. I have tried this approch.

Perform a find on all the CLOSED status records, show the omitted records, then perform another find on this group using the name as the find parameter.

This unfortunately isn't working to my expectation, meaning that I'm getting incorrect results. Here's the script

GO TO LAYOUT[X]

Enter Browse Mode[]

Show All Records

Enter Find Mode[]

Insert Calculated Result [c_Status_Code; "CLOSED"]

Perform Find[]

Show Omitted

If [not IsEmpty(g_Refer_To_Name)]

Set Field ["Refer_To", g_Refer_To_Name]

Perform Find[]

End If

The second find is nested in the if statment in case a name was not chosen. What I get is the entire set of records with the CLOSED Status instead of the converse.

The g_ fields are globals that I use to set up the criteria for name and status and each have a value list associated with them.

How can I construct a find procedure that will return a set of records by name and not CLOSED status?

Thanks

The Mad Jammer.

cool.gif

Link to comment
Share on other sites

Another way to do this is to make two find requests in your perform find:

The first request has the persons name

The second request has CLOSED in the status field with the omit box checked.

This will return all records with that person's name except those that are marked closed.

Dana

Link to comment
Share on other sites

OOPS,

Bob, the only problem I encountered is that the c_Status_Code can be blank, meaning that there is a grace period before the item is flagged as DUE. As a result, those items have a blank in the new calculated field as well. I suppose I should simply set the c_Status_Code to some initial value at the outset which will force the 1 in the new calculated field.

The Mad Jammer cool.gif

Link to comment
Share on other sites

You can script it dynamically, also.

Enter Find Mode [ ]

Set Field [Refer_To, g_Refer_To_Name]

New Record/Request

Set Field [c_Status_Code, "closed"]

Omit Record

Perform Find [ ]

Link to comment
Share on other sites

  • 3 months later...

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