Creating a notification to take action

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 Solved
0 6 382
1 ACCEPTED 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?โ€

View solution in original post

6 REPLIES 6

Steve
Platinum 4
Platinum 4

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:

  1. Evaluates records in the child table Ratings to see if any new entries have been created for the current week. Note I do have a week ending column in the Ratings table that sets the EOW week date to Saturday at midnight (EOWEEK(TODAY()) + 1)
  2. If no, it sends a notification

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.

Top Labels in this Space