emha
Collaborator

Re: Attempting to start workflow using specific column content - issue

Jump to solution

okay, I see your problems then.

if it's an option for you I would completely changed the design:

1. create a list that will store your country/region to mail mappings. basically you needs just two columns like - "Country_Region" and "Mail_Addresses", but you might find it useful to store there some further details as well.

that way your application will be much more flexible and easier maintanable

2. you might consider as well to change your country/region choice column to a lookup column in sharepoint list and connect it to "Country_Region" column of above created list.

this is just optional, and if you decide not to change it, it will not affect functionality.

however, it brings you advantage of storing definition at one place and keep you out of typo or case-sensitivity problems

the disadvantage is little bit complicated work with multi selection lookups in workflow.

3. then in the workflow you have to go through the options and identify which ones are selected.

for each selected option you will have to query list from step 1 and based on the selection (ie. country/region) identify respective mail address.

depends on how do you need to build your mails I would see two possible options how to manage it further

3a. if you can send the same mail (in term of body, attachments, ...) to all the recipients then you can collect all the mail addresses into a text variable. once you have done that for all checked options, you can proceed to step 4

3b. if you have to send different mails to different recipients you will have to place mail action into this loop directly and configure it according the option you are just working on.

4. if you implemented solution 3a. now you can build your mail action and supply to recipients field the variable with collected mails

hope it makes sense for you.

Reply
johnfb59
Novice

Re: Attempting to start workflow using specific column content - issue

Jump to solution

Hi Marion

I am most grateful for your time in assisting, I will work on this and if I may come back to you if I have any questions? otherwise I will let you know the results asap.

Thank you and kind regards

John

Reply
emha
Collaborator

Re: Attempting to start workflow using specific column content - issue

Jump to solution

no problem.

just raise a detailed question, and if not me, somebody on the forum will definitely pick and answer it.

Reply
Not applicable

Re: Attempting to start workflow using specific column content - issue

Jump to solution

Let us know how if you got a "correct answer," John Bethray​, and click the button under it if you can.

Thanks!

Frank

Your community manager

0 Kudos
Reply
johnfb59
Novice

Re: Attempting to start workflow using specific column content - issue

Jump to solution

Frank

Thanks for the email, I am still working on this I have marked the reply from Marion as helpful for now, I will come back to the boards once I have completed or need other assistance, but so far I have not resolved this.

Best regards

John Bethray

Reply
johnfb59
Novice

Re: Attempting to start workflow using specific column content - issue

Jump to solution

Could it be this simple?

Taking Marion's advice I redesigned my list and made the regions and countries into one lookup list with multiple selections.

I then created my workflow variables associating each variable with an email address ( there are 80), for this experiment I created a 'John Bethray' (it could be any name but it must be the same name that appears in the distribution lists/workflow variables that can be chosen) I then associated 'John Bethray' with my email address. I then rebuilt the workflow like so, but it looked to simple:

 

I then created a new variable called 'Current DL selected' then in the Build String section I asked the workflow to look in the column 'Distribution Lists' and add that to Current DL selected.

In the email notification I added 'Current DL selected' in the To: section

I then saved and published the workflow

I then added a new test entry into the SP list and selected 'John Bethray' when I got to the Distribution Lists, I guess I held my breath then and clicked save - the email arrived,

I repeated the above and did not select any Distribution Lists - no email.

Is there any reason why this should now not work with potentially up to 80 Distribution Lists selected?

As I said, it seems to good to be true?

Thanks for looking

Happy Easter folks!

John

Reply
johnfb59
Novice

Re: Attempting to start workflow using specific column content - issue

Jump to solution

Further issues encountered:

I have added multiple users now to the testing and getting error messages that the workflow is unable to get the full name or email address of the added users, it is most odd as it still works fine for me, so I added to the workflow a variable to set one of the users email address like so:

This is the error message I get from the Mail Notification part:

Workflow Details:

 

Detailed history of this workflow.

Action History
ActionStartEndDuration
Send notification to DL's selected29/03/2016 09:02incomplete
Set variable29/03/2016 09:0229/03/2016 09:020 minutes
Find DL selected in the notification29/03/2016 09:0229/03/2016 09:020 minutes

Task History
Workflow Messages
TimeEventMessageOutcome
29/03/2016 09:02Workflow CommentFailed to send notification. Cannot get the full name or e-mail address of user "Xxxx - Xxxx".Error

29/03/2016 09:02

ErrorAn error has occurred in New Workflow.
0 Kudos
Reply
emha
Collaborator

Re: Attempting to start workflow using specific column content - issue

Jump to solution

I would point you once again to my following comment https://community.nintex.com/message/35525#comment-35525 since I have feeling you haven't understood/implemented it the way I described it.

there is no need to maintain 80 variables within workflow at all!

rest of your logic is somehow not clear to me.

I've tried to build simplified version of that scenario.

my country region vs. mail addresses lookup list.

an item in my 'main' list with multiselect choice of country/region

workflow overview

single actions

workflow history

0 Kudos
Reply
emha
Collaborator

Re: Attempting to start workflow using specific column content - issue

Jump to solution

hard to help since I do not see what you really do in your actions and what you do get from list item.

have you manually edited user to be "Xxxx - Xxxx" or do you really get that value? do you correct user/mail value at all?

0 Kudos
Reply
johnfb59
Novice

Re: Attempting to start workflow using specific column content - issue

Jump to solution

Hi Marion,

May I give a huge thanks for assisting with this, I am truly grateful, I am still new to Nintex and learning by the minute, you have steered me in the right direction, I eventually got this all working as required although slightly differently from your post of 29-Mar-2016 14:52.

Explanation

My logic in attempting to use the workflow variables at the beginning was mainly due to the fact that the multiple selection Add/Remove fields in the SharePoint 'New Item' form were too narrow to show the full email address I needed so I attempted to use the abbreviated names created as wfv's as these fitted, since then using jquery I have made these Add/Remove fields wider.

Next

I created  a new column in my Lookup list 'Col 3' therefore: Col 1 = Name of distribution list Col 2 = Abbreviated GAL Name & Col 3 = actual email address. I kept my workflow the same as described in my post of 24-Mar-2016 14:55 my only change was to Lookup Col 3 not Col 2 and it all started to work.

Many thanks for your patience and time taken, another school day ;-).

Regards

John

0 Kudos
Reply