Hi everyone,
I managed to create views using the javascript Scripts, and to programmatically add filters and hidden columns, but I’m stuck on creating a group : I figured out the syntax of the “groupbys” key, but the “group” key seems really tricky because grouped rows are hardcoded… Is there a simple way, e.g. an existing javascript function, to create a group in a view ?
Thanks a lot,
Bests,
Hi @daniel.pan
I have a table filled by several contributors (around 30 people) through a form. For each activity they carry out, they fill a form with few data, like the category of the activity, and how many time they spent on it.
For each contributor, I want to create a view grouped by categories of activity, but as there are several contributors (sometimes changing), I don’t want to create all the views manually.
Anyway, I found a workaround : I created a single “reference” view (refView), grouped by categories of activity, using the interface of Seatable (no script yet). Then, each time I create a contributor view (contribView) using a javascript Script, I simply write contribView.groupbys = refView.groupbys; contribView.groups = refView.groups;
Applying filters using contribView.filters.push({"column_key":base.getColumnByName(myTableName, myColumnName).key,"filter_predicate":"contains","filter_term_modifier":"exact_date","filter_term":myFilteringTerm})
or hidden column using contribView.hidden_columns.push(base.getColumnByName(myTableName, myColumnName).key);
is less tricky than grouping, but it could still be really useful, for all these actions, to get proper functions.