Not applicable

One list, multiple entries, one email

I have a list of projects.  I want the project manager to go in and update information for each line item once a month.  I would like to set up a work flow that will send out an email notification once a month.  I can do that part.  What I don't know is how to send only one email even though the PM is listed on more than one line.  So Project Manager A has 3 different projects on this list that they have to update.  How do I get my workflow to know to only send one email, not 3?  I am simply directing them to the page where the list is located, not to the indiviual line item.  Thank you

0 Kudos
Reply
13 Replies
christopheraucq
Automation Master
Automation Master

Re: One list, multiple entries, one email

Hi Jennifer,

Are you developing with O365 or on-Premise?

Best regards,

Christophe

0 Kudos
Reply
Not applicable

Re: One list, multiple entries, one email

Christophe,

I'm not sure. I think O365

Jennifer

0 Kudos
Reply
christopheraucq
Automation Master
Automation Master

Re: One list, multiple entries, one email

Hi Jennifer,

To check, click Site Contents.

Do you see the App Nintex Workflow for Office 365 ?

If yes, it is O365

Best regards,

Christophe Raucq

0 Kudos
Reply
markuden
Nintex Newbie

Re: One list, multiple entries, one email

I'm only familiar with on-premise Nintex, so I'm not sure what functionality is available in O365. However, generally, I would:

  1. Create a site-workflow (though a list workflow would also work).
  2. Query the list of projects, ordering by Project Manager name (so you get all of Project Manager A's projects, then all of Project Manager B's projects etc.).
  3. Loop through the collection.
    • Check if the current Manager is different from the previous one. If so, email the previous Project Manager.
    • Add the current project details to a variable that will be the body of the email.
    • Set the "Previous Project Manager" variable to the current Project Manager.
    • Go to the next item.
  4. Send the final email.

Hope that helps!

Reply
Not applicable

Re: One list, multiple entries, one email

Sorry for the late reply.  I still am not sure where I should be looking to find out.  This is what I see...

Nintex workflow.png

0 Kudos
Reply
christopheraucq
Automation Master
Automation Master

Re: One list, multiple entries, one email

Hi Jennifer,

This is the on-premise version.

Bets regards,

Christophe

0 Kudos
Reply
Not applicable

Re: One list, multiple entries, one email

Mark this is helpful, however I an so new to this I am stuck at number 2.  🙂  You say Query the list by PM, but I'm not sure which function I would use to create the query.

Thank you

Jennifer

0 Kudos
Reply
markuden
Nintex Newbie

Re: One list, multiple entries, one email

Basically, you:

  1. Create a collection variable to hold the results of the query.
  2. Add a Query List action.
    • Specify the list that contains the projects.
    • Set it to sort by Project Manager.
    • You might want to filter it to show only open projects etc.
    • Select the ID column, and tell it to put the results in the collection variable.

You'll then need a "For Each" action to loop through each of the projects in the collection variable. This will give you the ID of the project, which you can then use with Set Variable actions to find the other information you need, like the Project Manager, project name, date created or whatever. This will give you all the information you need to add a line to an email.

I hope that's helpful. It's hard to explain this stuff in text, so I recommend you have a play with it if possible.

Reply
akrasheninnikov
Cloud Wanderer

Re: One list, multiple entries, one email

As an alternative, use a simple XSLT transform on the result of a Query XML or Call web service action that will build the email in a single action. You can start with the following.

<?xml version="1.0"?>
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:z='#RowsetSchema'>

<xsl:template match="/">
  <html>
  <body>
    <h2>Heading</h2>

<table>
  <xsl:for-each select="//z:row">
  <tr>
   <td>
    <p style='text-align:center'>
     <span><xsl:value-of select="@ows_YourField"></span>

     </p>
    <p style='text-align:center'>
     <xsl:element name='img'>
      <xsl:attribute name='alt'>...alternate text for the image...</xsl:attribute>
      <xsl:attribute name='style'>margin-bottom:15px; /* other style rules */ </xsl:attribute>
      <xsl:attribute name='src'>http://images.YourCompany.com/path.../<xsl:choose>
       <xsl:when test="@ows_SomeTaskStatus = 'Closed'">
        <xsl:text>...yourimage1.png...</xsl:text>
       </xsl:when>
       <xsl:otherwise>
        <xsl:text>...yourimage2.png...</xsl:text>
       </xsl:otherwise>
      </xsl:choose></xsl:attribute>      
     </xsl:element>
    </p>
  </tr>
</xsl:for-each>
</table>
</body>
  </html>
</xsl:template>

</xsl:stylesheet>

Reply