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

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

Recommended Posts

Posted (edited)

Is there any easy way to do this that I'm just not aware of?

I have a value list ("All Departments") populated by values in the field "Department" stored within the table "Users".

In the "Hardware" table (which has a relationship to "Users") there's a text field "DeptFilter" that's global, set to display as a checkbox set using "All Departments".

When the user clicks a "Find" button they're presented with a simple layout showing the "DeptFilter" field as an assortment of checkboxes. In theory, they select one or more checkboxes and click OK which then triggers the script to show only those hardware records tied to the selected department.

Selecting a SINGLE department works fine; selecting multiple departments breaks.

How does one script a search like this?

Edited by Guest
Posted

The DeptFilter field in Hardware is global? That doesn't sound right. If it's checkboxes though, then a given hardware record can have multiple values in DeptFilter, yes?

It might be easier to set up a self-relationship using DeptFilter and script a GTRR (go to related records) rather than a Find.

Posted

GTRR (or even a portal) is the easy way. To do this by finding, you need to have your script loop and create a separate request for each value in DeptFilter.

Posted

Makes sense. How do you separate the values within the field? When I duplicated the field and changed the duplicate to an edit box, I see that each selected item within the checkbox list becomes its own line of text in the edit box. Presumably there's a way to count the number of lines and extract each separate line to perform the separate requests?

Posted

The beauty of the GTRR approach is that you don't need to break out the separate lines: it "just works."

Posted

ValueCount() will do the count. You can get the correct value simply by using GetValue() in conjunction with the request number, and exit the loop when the number of requests reaches the count.

I am sure I have posted a demo of this at some time, but I have too many posts and too little time to look for it now.

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