Can i run a workflow expression that will check for duplicates and NOT show/move that data?

Working in workflow - i need an expression that will look at data - but will not send data if it is a duplicate of data.

Example:

Table A has column - [Location]

I want the expression to send data once PER [location]

Probably, but your problem description is confusing.

Sorry.

If my table A looks like this:

[Location] [DSO]
Bmt 19
Bmt 19
Bmt 19
Baton Rouge 25
Baton Rouge 25

In this example - i would only want Bmt DSO - 19 sent ONE time

Does that make sense?

So you want only the distinct values,or distinct pairs in this case.

You need a template expression?

I want a workflow rule - so it can fire off a “Move data to another table with a new row” - using this data.

So the new row added to my other table will be:

[Location] [DSO]
Bmt 19

But only once. Not the three rows…

One workflow rule is not aware of the activity of other workflow rules, except as reflected by the data in your tables. So, for instance, if you update three rows in short order, there’s no inherent way for the workflows to know that there are three changes to handle and that some process should only be done once.

1 Like

oh ok. So how would i get this process done?

Impossible to say without knowing the details of you process.

Ok. The Table A - i have been referencing looks like this:

[Sales Territory] - is basically - [location]*

In the table in my app - i have a VC:

This gets me DSO per [location]:

I want to move that view of values - to another table. But I only want one row PER [location]

***In the above view - there IS only one row showing - but if you click on it - it will show all the rows showing same data per [location]

1 Like

Do you currently have a table that has one row per branch? Maybe a Branches table?

Yes. And I currently have a button - that can send a row to it. But i have to do this manually and I want it done automatically at a certain time of day:

image

1 Like

But how do i make it ONLY send one row? Meaning - send only one row per location?

Do you currently have a table that has one row per branch? Maybe a Branches table?

Oh, sorry. Yes:

image

Hmm. Well, below are the actions you need to generate the report rows, but there’s no way to perform an arbitrary action from a report unless the report is run against each row of the table. So to schedule a report to run only one a day that generates data rows, you’ll meed a table or slice with exactly one row and run the report against that row.

Action 1

  • For a record of this table: (branches table)
  • Do this: Data: add a row to another table using values from this row
  • Table to add to: (report table)
  • Set these columns:
    • (location column): [Key]
    • (DSO column):
      SUM(
        SELECT(
          table A[DSO],
          AND(
            ISNOTBLANK([Sales Territory]),
            ([Sales Territory] = [_THISROW].[Key]),
            ...
          )
        )
      )
      
  • Only if this condition is true:
    ISNOTBLANK(
      FILTER(
        "table A",
        AND(
          ISNOTBLANK([Sales Territory]),
          ([Sales Territory] = [_THISROW].[Key]),
          ...
        )
      )
    )
    

Action 2

  • For a record of this table: (report table)
  • Do this: Data: execute an action on a set of rows
  • Referenced Table: (branches table)
  • Referenced Rows: branches-table[Key]
  • Referenced Action: (action 1)
  • Only if this condition is true:

Action 3

  • For a record of this table: (report table)
  • Do this: Data: add a row to another table using values from this row
  • Table to add to: (report table)
  • Set these columns:
    • (date column): TODAY()
    • (location column): "Total"
    • (DSO column):
      SUM(
        SELECT(
          report-table[dso-column],
          AND(
            ([date-column] = TODAY()),
            NOT("Total" = [dso-column])
          )
        )
      )
      

Action 4

  • For a record of this table: (report table)
  • Do this: Grouped: execute a sequence of actions
  • Actions:
    • (action 2)
    • (action 3)
1 Like

Thanks Steve,
I am running into this error?

Whoops! I should have explained! These dots:

image

represent whatever other conditions you need to add to select the appropriate rows for the sum. For instance, to heck the date. Replace the dots with any other conditions as appropriate.

OH. I gotcha. Sorry i’m stupid… :crazy_face:

1 Like

I did something wrong. I think i didn’t use a slice? I got like 1000 new rows :grinning: It should have been like 11