You are viewing limited content. For full access, please sign in.

Question

Question

Order Results from Query Rule in WF

asked on February 10, 2023

Hi,

I have a Query Rule which returns a data set in my WF (for example):

John Smith     3

John Smith     4

Jane Doe        6

Jane Doe        3

Jack Dunn      2

Jack Dunn      1

 

I am trying to create an email that would show the above dataset grouped by name and total thus:

John Smith      7

Jane Doe          9

Jack Dunn        3

 

What is the best way to achieve this in WF (Cloud)

0 0

Replies

replied on February 10, 2023 Show version history

I know Workflow has different options in Cloud than it does onPrem, so if this doesn't work, I'm really sorry.  But can you do a Custom Query activity instead of a Query Data activity?  If so, you can write it into the query to group and sum the totals.  General idea: 

SELECT
  [name],
  SUM([record]) AS count
FROM [my_table]
GROUP BY [name]

 

If a Custom Query activity is not possible in Cloud - do you have the ability to add a custom view to your database?  Because you can write the query with the grouping and save it as a custom view, and then your Workflow can just query the view instead of the table.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.