Need help in workflow

Hi,

We have a project within a project there are sub items, how do we create a workflow to send out report at project level rather than an item level. Currently it is possible in appsheet to send email if an line item is marked as complete but trigger should club all items in project which are marked as complete in day and send out the email.

0 7 486
7 REPLIES 7

I suggest starting with this article https://help.appsheet.com/behavior/workflow-introduction/workflow-and-reports-the-essentials

It explains Workflows and Reports and how each are triggered. Your first step is to decide whether you want to use a Workflow (update triggered) or a Report (time triggered).

Whichever way you trigger the Workflow or Report, it can essentially act on any data you choose. That is possible because your Workflow or Report can select which data is acts on via an expression.

this link no longer works (found this while looking for info on the same topic)

@Phil to help this along, if there were a Parent/Child reference relationship, wouldnโ€™t the Parent automatically be flagged as changed anytime one of the children changed?

If you simply change a child, we trigger the workflow rule for the child record. If no change is made to the parent record, the parentโ€™s workflow rule is not triggered.

Normally, when a child Workflow rule is triggered, it will do something based on that child record. This might include, but is not limited to:

  1. Displaying or updating the child record.
  2. Displaying or updating the child recordโ€™s parent or grandparent record.
  3. Displaying or updating one of more of the child recordโ€™s grandchildren or great grandchildren records.
  4. Doing some combination of all of these things.

Having said this, there are really no restrictions on what the workflow rule can do. It can use a Select statement to display or update records of any table.

Here is the way to think about it.

  1. A Workflow rule is triggered by an add, update, or delete of some record.
  2. A Report is triggered at a time you specify.
  3. Once the Workflow rule or Report is triggered, it can do anything.

People sometimes assume that because a Workflow rule is triggered by an add, update, or delete of a particular table, the Workflow rule is limited to working with that record. That is not true. Often the added, updated, or deleted record contains data that influences what records the Workflow rule acts on. But that does not restrict what the Workflow rule can actually do.

@Phil Ok, I stand corrected then. Although you didnโ€™t answer explicitly, I believe you said that the Parent is NOT automatically flagged as changed if a child is simply changed.

@Mohammed_Zaid

There are several ways to solve your problem. Because you want to send the email once a day for projects that had any sub-items changed, you will want to use the Report functionality. Reports can only look at the current existing data to decide on actions - i.e. they will not KNOW that an item changed - unless you remember it somehow.

The way I would probably do this is write a condition that finds all Projects where at least one sub-item has completed. To know this I would suggest a Date field on the sub-item so you know WHEN it was completed - say its called Completed Date.

For the below, I will assume you have a table named Projects and another named SubItems.

Next (be sure to confirm syntax) you would create a Report to run once a day, for each row in the table Projects, with the condition:

Count(SELECT(SubItems[Project Id], AND([_THISROW].[Project ID] = [Project ID], [Completed Date] >= TODAY()))) > 0

This statement simply checks if there are any SubItems that match the Project ID of the current Projects row being processed AND has a Completed Date of today.

Again check syntax.

[_THISROW] simply removes ambiguous references to Project ID between the Projects table and the SubItems table (if you were to have that issue!) Otherwise, [_THISROW] can be removed.

Pleaseโ€ฆanyone else jump in if I have anything wrong above!

Hi John,

You are doing a great job of helping.

I was just trying to clarify the single point that the parent workflow rule is not triggered if the child is changed.

Thanks for providing such great help regarding the customerโ€™s question.

Thank you very much for the replies. However, I think this is difficult to set by just theory, can i have any video or we can sync up live.

Top Labels in this Space