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

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

Recommended Posts

  • Newbies
Posted

Hi, In my found set of records, how can I narrow the found set to display only the records I want, using a field with a value list (without having something scripted in my original script, therefore this has to be secondry).

E.G.

The found set in question shows records within a date range in my report, but I further need to filter these records by field "model" (this is the field with the value list). My idea is that when the generic found set is displayed in my report, I can then select from the drop down list of "model" field, any model I want, then it filters by my choice and displays the records. Your help is appreciated....

Posted

I see two approaches: Use a script trigger to constrain the found set by the value in a global field that uses the model value list.

or

Give the user a find dialog and script the find. You'd give them gStartDate, gEndDate and gModel.

Often, these scripted find routines are too narrow. Consider just building a Find layout (very similar to the entry form by without buttons that do other things) and letting the user specify any criteria.

Posted (edited)

You are probably better off with a fully relational filter, showing records in a portal.

You probably need one calculated field that shows

"" (no space) return

model

as a calculated key field.

Self Relationship:

Records TO Global fields Main TO

StartDate >= g_StartDate

and

FinishDate <= g_FinishDate

and

c_Model = g_Model

The global fields (g_StartDate etc) are user entered from value lists.

c_Model is the calculated field described above.

When g_Model is blank, all records in the date range should relate.

When g_Model is populated,only those models in the date range should show.

From there us a go to related record step to get out of portal mode and into the actual records.

Edited by Guest
  • Newbies
Posted

Thanks for the responses.

I would prefer to use a script trigger in this situation, maybe a button. I have never used the "constrain found set" in a script before so some advice or example would be great of how the script would look. My model field is now a global and it has the value list (showing my models). Many thanks.

Posted

The problem with constrain, is you'll need to provide a way to restore the initial found set. What if they constrain to zero found?

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