I’m working on an AppSheet application with the following setup:
Tables:
Goal:
For each row in the To Do table referenced by the [Milestone] column in the Steps table, I want to:
Hi @Laye1 , I undestand that Step Table is the parent and To Do Table is the child, where Step Table key is [Milestone] and also exists in To Do Table as a Ref type field, correct?
If so, the expression IF([Milestone].[Status]="Done",[Due]-[Date/Time],[Due]-NOW()) used in a "virtual" To Do Table field will work.
Once [Due] and [Date/Time] are To Do Table fields, I didn't understand why you referenced them with [Milestone].
Hi @RBTAndrade , Thank you for your reply. The virtual column is from Step table, hence [Due] and [Date/Time] are unknown columns, unless they're referenced.
The expression is used in Step table not "To do " table
Hi @Laye1 , if I understood well, Step is the parent table and To_Do is the child table. So, To_Do table must have a Ref column that references Step key column.
So, you need a virtual column in Step table that references all child records with the expression to calculate durations (it will be a LIST column). In this case, first you create a virtual column with the expression in To_Do table. Second, you create a virtual column in Step table that references this virtual column from To_Do table, like this:
a) Virtual column "Duration" in To_Do table: IF([Status]="Done",[Due]-[Date/Time],[Due]-NOW())
b) Virtual column "Durations" in Step table: To_Do[Duration]
For me, It's not clear when you say that you need to iterate over child records. If you need more help, please describe all fields from Step and To_Do tables.
User | Count |
---|---|
17 | |
14 | |
8 | |
7 | |
4 |