Not applicable

Email content to get only what been selected.

Hi all Nintex Experts,

I am not sure what action of Nintex Workflow (for office 365) to be used when multiple selection field has one or more boxes been selected so that an email to be sent? I try to "Run If" but when it asks for Value, I don't know what value to enter in? 0 or blank is not accepted by Workflow.

Also when I receive an email, it does not look as what I need (Below); Note "1" and "3" are ticked boxes in the field; not sure whether I need to create "Trim String" action or if you have any suggestion please advise.

Really appreciate your assistance.

Thanks a lot.

Reply
7 Replies
tbeduneau
Novice

Re: Email content to get only what been selected.

If your goal is to get only the "1" and "3" values,  you should use Regular Expression : it will help extract the string you want from this complete string.

Reply
Not applicable

Re: Email content to get only what been selected.

Hi Thomas,

Thanks a lot for your help. As I received the email:

I then want to delete from "{" up to ":" as I only need selections of "Enter Choice #4, 5 and 6) in the line of Company Selection.

This is my Workflow and Regular Expression but I still dont get the email.

Any idea why it is not working?

Thanks,

Man

Reply
tbeduneau
Novice

Re: Email content to get only what been selected.

If your string is :

{"_metadata":{"type":"Collection(Edm.String)"},"results":["Enter Choice 1","Enter Choice 2"]}

use this pattern :

results":\[(.*)\]}

The result will be :

"Enter Choice 1","Enter Choice 2"

Hope this help !

Reply
Not applicable

Re: Email content to get only what been selected.

Hi Thomas,
Thanks for your help. I however got the following text:

  • Company Selection:{"__metadata":{"type":"Collection(Edm.String)"},"

Not "Enter Choice 1","Enter Choice 2"? The pattern input as "results":\[(.*)\]}" actually be removed?

Do you have any idea?

Thanks,

0 Kudos
Reply
tbeduneau
Novice

Re: Email content to get only what been selected.

The pattern :   results":\[(.*)\]}

Means : I want to keep everything between results:"[   and ]}

You can then adapt the pattern to get whatever you want.

You can also test your pattern on your string with some Regular Expression validator like Online regex tester and debugger: JavaScript, Python, PHP, and PCRE

- Put your pattern in the top line

- Put your complete string in the text box

- You'll the the result in green !

Reply
cassymfreeman

Re: Email content to get only what been selected.

‌ did the response solve your issue? Can any response be marked as correct? 

0 Kudos
Reply
praios81
Contributor

Re: Email content to get only what been selected.

Faced the same challenge today and the pattern worked for me. When using the pattern above the output was

results":["choice1","choice2"]}

I changed the pattern to \[(.*)\] and the result remained ["choice1","choice2"] which is "better" but not good.

Surely I can trim the result further but for normal users it seems to be some hard work just to get out some selected values. Still thanks for the hint.

0 Kudos
Reply