Hey all,
Iโm trying to create a notification to get the user to take an action.
I have Parent Table: Commitments, and Child Table: Weekly Actions
I want to first check the Child table to see if any records with a particular status exist and if not send a notification.
I have two approaches in mind creating a virtual column that:
a. counts records in the Weekly Actions table with a status of 2. In Progress
OR
b. uses a yes/no expression to evaluate if there are any matching child records with the 2. In progress status
I would then create a notification workflow that checks the value of the virtual column. If the value is a. 0 or b. FALSE it would trigger the notification
Here is the expression Iโve used for Option B:
IN(
2. In Progress,
SELECT(
Weekly Actions[Status],
[_THISROW].[Plan ID] = [Commitment]),
)
I get a notice that this could be costly in terms of app sync time. Is there a better approach?
Solved! Go to Solution.
Try:
ISBLANK(
FILTER(
"Ratings",
AND(
([_THISROW].[Plan ID] = [Commitment]),
(
(EOWEEK(TODAY()) + 1)
= (EOWEEK([Created]) + 1)
)
)
)
)
FILTER(...)
asks, โwhich ratings for this plan were created this week?โ ISBLANK(...)
asks, โwere no ratings for this plan created this week?โ
Because itโs a virtual column.
I donโt see a reason for a virtual column. Your workflow If this is trueโฆ condition expression should be able to make the decision without the virtual column, it seems to me.
Oh I wondered about that. Thanks Steve. Iโll give that a try.
Follow up question in the interest of getting rid of other expensive virtual columns I have in my app:
How would I write an expression that:
Iโm currently doing this using a virtual column in the Commitments table that finds the Max of Latest Ratings from a list using this expression: MAX(SELECT(Ratings[Created], [_THISROW].[Plan ID] = [Commitment]))
And then I have condition in the report that evaluates NOT([Latest Ratings] >= TODAY()-7)
Is there a way to simplify that into one condition in the Notify Report?
Try:
ISBLANK(
FILTER(
"Ratings",
AND(
([_THISROW].[Plan ID] = [Commitment]),
(
(EOWEEK(TODAY()) + 1)
= (EOWEEK([Created]) + 1)
)
)
)
)
FILTER(...)
asks, โwhich ratings for this plan were created this week?โ ISBLANK(...)
asks, โwere no ratings for this plan created this week?โ
Supposing you use a slice containing items of the status of interest. It may have fewer records to read through preserving your sync timesโฆ
Thanks Steve,
This is working. Iโll keep an eye on the sync time.
This one actually did take a long time to sync but Iโm assuming that will be a once a week thing when the notification is triggered.
User | Count |
---|---|
42 | |
34 | |
27 | |
23 | |
16 |