Remove duplicates from a table to trigger a workflow

Hi Community!!

Does anyone knows how to remove duplicates from a table without using timestamp, maxrow or select??

We want to trigger a workflow that takes information of this table, and sends an email with the information of the same “REQ” but to different “Nombre_emisor”, and we already manage to accomplish that. The problem is that if the “Nombre_emisor” has to products in the same “REQ” the workflow sends two emails with the same information, so we want to remove duplicates so it only sends one email.

As you can see in the picture, we can’t use timestamp because its the same timestamp in each “REQ” so it is not a unique value, and I don’t know why the select funcition (Select(DB[Nombre_receptor],true,true)) is not working for the workflow condition.

Help me please, we have like 2 weeks trying to acomplish this.

0 4 397
4 REPLIES 4

Steve
Platinum 4
Platinum 4

What triggers the workflow? A change to this table, or a change to some other table?

What result do you want? Row keys? Or the value of some column of each row?

I’m really having trouble trying to figure out what you’re trying to accomplish.

The workflow is trigger by a change to this table, the result of the trigger is the information grouped by the “REQ” number on an email. We already have that.

In this example, we are triggering the “REQ 8”, if you go to the table that I uploaded on the other post, you can see that REQ 8 has 3 rows (2 rows for “Servicios Ferreteros” and 1 row for “FIBBSUR”.

And the workflow identifies the “Nombre_emisor” that in this case is “Servicios Ferreteros” and group the two rows that corresponds to this “Nombre_emisor”.

The problem is that the workflow sends two emails with the same information to the same email address because there are two rows for Servicios Ferreteros.

So the question is if there is a way that we can eliminate duplicates directlty in the workflow condition without using the timestamp column and with a Yes/No expression.

I don’t know if I make my self clear?

I still have no idea what you’re trying to accomplish. You’re telling how you’re trying to get there, but you haven’t told me where there is.

Why are changes being made to the table?

Why do you want changes to produce emails?

Is the idea you want the email to go out only after all additions have been made for a particular REQ value? How does the app know when all additions have been added?

Have you read this?

Yes, I already read the article.

Why are changes being made to the table? The main point for this table is to work as Purchase Order to different suppliers (Nombre_emisor).

So a #PO is equivalent to a #REQ
We create a #REQ with a form and select different suppliers with different products, so when we save the form the data would end like this in the database.

 Date      #REQ       Supplier          Product     Qty

11/17/2020 REQ-9 Home Depot Glue 100
11/17/2020 REQ-9 Home Depot Scissors 50
11/17/2020 REQ-9 Walmart Pen 200

Why do you want changes to produce emails?
So when we saw the preview in a detail view we clic on an action button to send the PO to each of the suppliers with each of the products.

So Home Depot will receive 1 email with this information:
11/17/2020 REQ-9 Home Depot Glue 100
11/17/2020 REQ-9 Home Depot Scissors 50

And Walmart will receive 1 email with this information:
11/17/2020 REQ-9 Walmart Pen 200

At this moment we already have the emails but instead of sending 2 email’s one to each supplier, we send 3 emails, 2 emails with the same information to home depot, and 1 to Walmart.

Is the idea you want the email to go out only after all additions have been made for a particular REQ value? How does the app know when all additions have been added?
Yes, that is the idea, the app will know because we will clic the action button “send”

Top Labels in this Space