Announcing List View Aggregation

Hi everyone :wave:

We heard your feedback about accessing input values inside the new list views, and we’re excited to let you know that list view aggregation is finally widely available on Retool Cloud. List view aggregation eagerly aggregates and exposes input values inside your list view, while maintaining virtualization to the best extent possible.

How to turn it on

Once the flag is toggled for your organization, select a list view and toggle “Enable instance values” in the “Interaction” section to turn on aggregation for your list view.

How to access instance values

Add any plugin that has a formDataKey in its properties (i.e., all inputs and list view) to your list view.

The values for those inputs will now be accessible on the list view’s state under the property instanceValues.

instanceValues is an array of objects for every instance (virtualized or not) of your list view, where the object is a mapping of an input’s formDataKey to its value. For your convenience, we’ve also included the primaryKey for each instance within that object (the primaryKey is defined in the list view inspector).

How else you can modify inputs

We’ve also added two convenience APIs to the list view:

  • resetInstanceValues will reset your input values to their defaults
  • clearInstanceValues will clear your input values

Coming soon

We’re currently testing list view support in forms, so instanceValues shows up in your form data and form APIs also manage list view inputs.

Please comment here if you run into any issues or have any further questions or feedback. Happy building!

12 Likes

Hi,

I think I found a bug, preventing a fairly simple and common use case.

The listview is used to display data, edit the data and then update the database.
When the switch1 is changed, the instanceValues are updated. That's the expected behavior.

Now, we want to parse the data and update the database via JS script.
When manually executed, the script works well and returns the data.

However, when the JS script query1 is triggered via an event (change of switch1), the script returns undefined.

So, it's not possible to use the data of instanceValues.

Any thoughts?

Regards,

I just ran into the same issue. @andoliveyou any suggestions?

Hi @MicExpert have you figured out a workaround to this?

I use a transformer as a buffer to parse the data between my objects and instance values. This approach allowed me to get my process working.

Regards,

Is this available on self-hosted? If yes, what version and is there any config we need to set up?

1 Like

Hey @rochlin_photon - welcome to the community! :wave:

This should definitely be available for any self-hosted instance that also has access to the new ListView component. I verified that it is available on version 3.33, for example.

If you would like to try it out on your own instance, go ahead and DM me your org name and I'll toggle it on for you!