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

expand and collapse using filtering


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

Recommended Posts

Posted

I have a portal (linked to "Items") that the user can populate with multiple items (records) at once from another table on a layout linked to the TO of "Order". Each group is assigned a header which appears in the row above the items. For example, Apple, banana, pear might fall under the header "Fruit".

When a new group of items is added to the portal they're all assigned a unique "groupID" and the header is also flagged "1" inside "groupheaderFlag". I have successfully gotten the groups to expand and collapse using a variable with the following calc:

Case (



IsEmpty($$toggle) ; True ;


$toggle  ≠ Items:groupID & Items::groupheaderFlag  = 1


)

A button set to display on header rows only toggles the headerFlag from 1 to nothing: 

If [isEmpty($$toggle)]
    Set Variable [$$toggle; Value:"1"]
Else
    Set Variable [$$toggle; Value:""]
End If
Refresh Window [Flush ; Flush]

 

The problem is - I have multiple groups that need to be collapsed/expanded at the same time in the same portal, but this method only supports one at a time. I would also like the "order" to remember what is expanded and what is collapsed when the order is opened. I believe this eliminates the use of variables and requires another field within the Order table ("ItemCollapse")

I realize I need the script to set ItemCollapse within the Order TO to the selected groupID, followed by a carriage return if more than one group is set to "collapse".  Would the portal filter then need call the List function to separate out the data and know what to filter out? I've managed to get this working by replacing the variable with the field ItemCollapse, but:

- I can't get more than one groupID to appear within ItemCollapse.
- I'm unsure what function would be able to separate the multiple ID's in one field once the above is solved.
- How to script the removal of a certain groupID if multiple IDs are listed within the same field.

Help appreciated!

  • 2 years later...

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