Setting Condition for Workflow Email

I am using the inventory sample app and setting up a workflow email with an excel attachment, so every time a new entry or multiple entries are made in Sales, then synced, I get an email with a list of just the newly written Sales rows in a sheet. Currently, the workflow just emails a list of everything in the Sales table.

The way to differentiate between entries can be the column “Description”, where the multiple item sales will have the same Description and get recorded accordingly.

I am not sure but I think setting up a condition on the workflow can help with that, but I need some help with writing the condition. Here’s what I had in my mind:

If description = “VALUE”, list out all the Sales data with the description "VALUE ". But the description VALUE is always changing and not definite, I can maybe sort by timestamp instead. Not too sure.

Please advise, all guidance is truly appreciated.

I’m unsure what exactly you’re asking help on. The first portion of your post suggests that you want a single email detailing multiple new entries. The second portion of your post suggests that you want a single email detailing multiple entries of the same description. Are these 2 separate things? Please clarify.

1 Like

What I meant to say is that I want a new email sent out with each unique value for [Description], currently, it sends out an email every time the Sales Table is updated with every single row in the Sales Table. However, I want it to send out an email with just the newly added rows, and they already have the same [Description] so I thought that would be how they could be identified.

First you’re going to need a way to signal the app that you have finished entering in new records for the current “period”. Then you need some way to signal to the app which [Description] value to output from the records in that period.

At that point, in your workflow template, you can display all the appropriate records with an expression such as:

START: FILTER( Sales , AND( [Period] = X , [Description] = Y ) )

Any suggestions towards the signalling? I thought turning off the automatic sync, then syncing manually after all records are added would sort of help, but it just sends a bunch of emails, with each attachment appending the next record in the file.

The goal is to pretty much generate an order statement for each sale made which is identified by the unique value assigned to the [Description].

Here is what I thought of as a alternative approach, I create a new table called where I have the column Description to ref to the Description column in the Sales table, and using the Description value, I can pull in all the rows of sales associated with that Description and then have the workflow email triggered pushing those rows.

I am not sure if this a more easier/efficient approach, or the wrong way to go about the problem. Any thoughts?

That sounds workable.

I am having some trouble with referencing the description values, it seems that a Key can only be enabled for one column of data in each table. In my sales table I have it enabled for the Barcode column as it references to the Product List table to retrieve all the data associated with that barcode value.

But in the Sales & the newly created BackEnd table I want to be able to have the similar situation where I can reference and have a dropdown of the Description values from the Sales table available for selection.

Is there a way around this, I tried looking at, and think that maybe the UniqueID() operand may be of help but don’t know how to go about it’s implementation.: