Skip to main content
Nintex Community Menu Bar
Solved

How do we get all results (sql query) to be stored in a variable so that we can later use that variable to send out an email to multiple email addresses?

  • October 9, 2024
  • 3 replies
  • 30 views
  • Translate

kpope
Forum|alt.badge.img+7
  • Apprentice
  • 28 replies

How do we get all results to be stored in a variable so that we can later use that variable to send out an email to multiple email addresses?

In a Site WF running daily

There are multiple Sql Queries configured the same (just on different views in db) pulling back multiple email (contacts) Storing in a collection variable - in the WF History, we can see only one email address is being stored (there should be several) 

When testing the query in the wf, we get multiple results - SQL Query is a success

we want the collection variable to take each email address and separate it by a comma or a semicolon - for emailing purposes. 

Best answer by kpope

recap:

this is a site wf run on a schedule

we were using a collection variable, the results were in a table, not in a single column.  Nintex doesn’t support results in a table. 

so we created a storedproc to return all the email contacts needed per item, per criteria, in a column.  

This worked successfully to simply use these variables in the email TO line. no issues. This is MUCH simpler and efficient than what I had previously designed. 

 

View original
Did this topic help you find an answer to your question?

3 replies

SimonMuntz
Nintex Employee
Forum|alt.badge.img+22
  • Nintex Employee
  • 2466 replies
  • October 10, 2024

Hi, @kpope,

Make sure you are using a Collection Variable and not a single line of sext variable in the Execute SQL action. My testing showed that a collection will return all rows but a a SLT will only return the first row.

Translate

MillaZ
Nintex Employee
Forum|alt.badge.img+21
  • Nintex Employee
  • 671 replies
  • October 14, 2024

Hi @kpope 
Have you solved your question? 

Translate

kpope
Forum|alt.badge.img+7
  • Author
  • Apprentice
  • 28 replies
  • Answer
  • October 14, 2024

recap:

this is a site wf run on a schedule

we were using a collection variable, the results were in a table, not in a single column.  Nintex doesn’t support results in a table. 

so we created a storedproc to return all the email contacts needed per item, per criteria, in a column.  

This worked successfully to simply use these variables in the email TO line. no issues. This is MUCH simpler and efficient than what I had previously designed. 

 

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings