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!

11 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,