Workflow Related list to father List Values previous row and next row

Good Afternoon All,

I have acreated a workflow,

In this workflow I have various conditions.

I have my Father Row (triggers the workflow)
This row has a list of related rows

as I iterate through these related rows in the template, I need to crearte various tables, but this depends on the row values before and after the row. How would I see what the values of certain columns are in the row previous and the next row of the list?

Having some trouble with this one,

Thanks,

0 8 255
8 REPLIES 8

Steve
Platinum 4
Platinum 4

It might help us to know hat sort of report this is. Why would a row care what comes before and after?

In my rows I have an action type,

Action Type are:

  1. Add ingredient
  2. Mix
  3. Add Water

If the Action is Add ingredient and the action before was Add ingrediant, I need to keep them together, if the step before was water or mix, I need to start a new process. New Table. I can do all this no prob, but I just need to be able to see what the values of the row before were.

Im more or less creating a batch sheet and need to group items together until a next step comes into play.

Are the rows arranged in any particular order for the report? If so, how?

The User has Created the recipe, so they are in the order the user created the Recipe. They need to Stay in the Same order.

Trying to get this. So Looking at the row before, is the action of same type, if so keep in the same group/Table, otherwise start new table. I can do all of this.

Just need help seeing what the value of the action was of previous row

Ingrediant
Ingrediant
Ingrediant
Ingrediant

Mix slow
Mix Fast

Ingrediant
Ingrediant

Add Water

Mix Fast

Ingrediant
Ingrediant

To get the value of the column column from the immediately-preceding row:

ANY(
  SELECT(
    table[column],
    (
      [_ROWNUMBER]
      = MAX(
        SELECT(
          table[_ROWNUMBER],
          AND(
            (...),
            ([_THISROW].[_ROWNUMBER] > [_ROWNUMBER])
          )
        )
      )
    )
  )
)

Replace table (twice) and column appropriately. Replace ... with an expression that matches only rows of the same recipe.

The get a column value from the immediately-following row, replace this:

MAX(

and this:

([_THISROW].[_ROWNUMBER] > [_ROWNUMBER])

with this:

MIN(

and this:

([_THISROW].[_ROWNUMBER] < [_ROWNUMBER])

Wow Steve,

So I filled in the blanks and this is what Im getting

I am taking it from an enum Column to a text column but this shouldnโ€™t matter. Base Type of Enum is Text.

Whoops! My expression was missing an equal sign between [_ROWNUMBER] and MAX(. Iโ€™ve revised my post above.

Awesome,

You should add this to your tips and tricks section

Top Labels in this Space