Sort and filter the child tables on workflow ...

Sort and filter the child tables on workflow template.

I have two tables, parent and child with strong relations (ispartof : true).

To create the workflow to parent table, when the column on parent is changed, the action is triggered to send email.

On this template, the child table listed in table form on google doc with start expression like this.

<<Start: [Related MOSM Dock Report (Photo)s By Report Date]>><<[Photo]>>

I wonder how to

  1. Orderby :

I have column with name of โ€œCategoryโ€ on the child table. How can we alter the start expression to sort the list by โ€œCategoryโ€ either asc, desc?

  1. Filter :

Also similar thing, but i wish to filter this table on template by โ€œcategoryโ€ column, to show the specific items only with the selected โ€œcategoryโ€.

Thank for your attention, but your help is appreciated to get the right syntax to achieve category, filter the child table for template.

0 10 1,260
10 REPLIES 10

<<Start: ORDERBY(SELECT(Related MOSM Dock Report (Photo)s By Report Date],[category]=โ€œPlaaplaaโ€),[category],TRUE)>>

Hi thank you. I tried your expression, but unfortunately, I ended up with error.

To see how oderby/filter work together,

i break down. First step, to make โ€œorderbyโ€ to sort the row. With this syntax it worked.

<<Start: ORDERBY([Related MOSM Dock Report (Photo)s By Report Date],[Category],TRUE)>><<[Photo]>>

I assumed โ€œfilter expressionโ€ in addition to above syntax may solve the problems, so I made syntax like this.

<<Start: FILTER(ORDERBY([Related MOSM Dock Report (Photo)s By Report Date],[Category],TRUE),[Category]=โ€Hullโ€,True)>>

This combination of filter + orderby did not work โ€ฆ ended up with error.

โ€“

I also assumed your syntax might be missing โ€˜โ€™ [ " before the name of column for select function, tried :

<<Start: ORDERBY(SELECT([Related MOSM Dock Report (Photo)s By Report Date],[category]=โ€œHullโ€),[category],TRUE)>>

but also did not work neither.

Wondering how to solve the problemsโ€ฆ@Aleksi_Alkio

The Key Column was missingโ€ฆ

<<Start: ORDERBY(SELECT([Related MOSM Dock Report (Photo)s By Report Date][KeyColumnName],[category]=โ€œHullโ€),[category],TRUE)>>

Still encountering error messagesโ€ฆ

Pulling out the โ€œselect expressionโ€ part.

SELECT([Related MOSM Dock Report (Photo)s By Report Date][KeyColumnName],[category]=โ€œHullโ€)

I added dot in between [ ] [ ], and added key from child table.

SELECT([Related MOSM Dock Report (Photo)s By Report Date].[Photo Unique ID],[category]=โ€œHullโ€)

I m wondering something wrong on Select function.

This is error message copied from Log.

qte

โ€˜ORDERBY(SELECT([Related MOSM Dock Report (Photo)s By Report Date].[Photo Unique ID],[category]=โ€œHullโ€),[category],TRUE)โ€™ is invalid due to: Error in expression [Related MOSM Dock Report (Photo)s By Report Date].[Photo Unique ID] :

unqte

Remove the dot away as it was in the original

Super! I got it through! and template showing exactly what i would

like show.

Thank you for your help once again!

You may be interesting in reading Praveenโ€™s postโ€ฆ

plus.google.com - Filtering of ref lists โ€“ expressed (and run) more efficiently Quite often, โ€ฆ Filtering of ref lists โ€“ expressed (and run) more efficiently Quite often, โ€ฆ plus.google.com

@Aleksi_Alkio Thank you very much for sharing this valuable post. If i m correct in reading this, those expression can be used both on template and app formula as well?

On my case for this post, i used expression on workflow template.

My tables are linked together by virtual column systematically generated on parent table.

For this particular virtual columns we always have something like

REF_ROWS(โ€œMOSM Dock Report (Photo)โ€, โ€œReport Dateโ€)

to pull โ€œwhole rowsโ€ under the child table.

To restrict the row appearing with filter by select function, i would be doable by putting syntax on App formula by replacing default syntax?

Or should be generate the new virtual column then kick the expression into app formula?

Just wondering how we can expand the use case for those expression, i.e. only for workflow template or other cases.

Because the virtual list is already a filtered list, itโ€™s more effective to read values from that list instead of reading the whole table again.

One user case could be if you need to sum another field from those child records. Then the app formula would be like SUM(SELECT([VirtualListName][PriceColumn],TRUE)) in the virtual column. Normally you would need to write the formula as SUM(SELECT(TableName[PriceColumn],[ID]=[_THISROW].[ID])).

@Aleksi_Alkio I got it ! Thanks for your detailed explanation. I got new tips to Appsheet now.

Top Labels in this Space