Skip to main content

I need help with trying to include information from a drop down/list to an email header. I have a cascading drop down where the first drop down asks about what product (5 options) is being used and based upon that answer, the next drop down will have a list of options, where each list of options are unique to the product that was selected.

 

I need to take the information from the second drop down to add to an email header from the workflow. However, I only need the first two bytes of data from that string of information. I have used the substring function before and so that part is easy. What I am having trouble with is the workflow in which I am using Set a Condition and Update Item. The problem is that it keeps defaulting to the name of the workflow. The list item VR01 (from Update Item attachment) is what I use to populate into my email header (and is where I do the substring function for the two bytes, in my example would be to read the 01,02,03, etc. from the list lookup).

 

I have provided some screen shots below. The first is my list lookup from the second drop down. The second is the Set a Condition and the third is the Update Item. Any help or insights would be appreciated. I am stuck with this one.

Hi

I am sorry I am really struggling to understand your problem.

Can you explain what you have in the current item the workflow is running on and what you need to get out at the end and where from?

I am afraid your screenshots aren't helping me to identify your actual requirement.


Hi Jeremy,

I'm also having difficulty understanding the problem. Can you please explain why in the "Update item" action why you're updating the field with the "List Name"? Is your "List Name" is the same as your "workflow name"? If you can provide more explanation of what you're trying to achieve or more screenshots of your workflow, that would be great.


Hi

I understand that, for example, you are wanting to get only "01" if the returned value is "01-Undisclosed Driver".

What I'm not understanding is why you've got "List Name" for your value to compare to. The only way it would make sense is if for each "Product", you then have an individual List. For example, a List named "Auto". 


It seems to me like what you probably want is to use the product instead of List Name as your variable-to-match, use a collection to get all of the data into it (everything that matches the product Auto, for example, in your list), then run through a loop with a substring to pull out each line of data and do something with it. In your case, sounds like you want to put it into an email header, so either a table or just a Multi Line of Text. So "For Each" (in the collection), substring(yourtext,2,0), then slap your substring into an MLT on top of another substring variable (so they stack) or use a semi colon or whatever so you have some spacing. 


Am I close?

rhia


Hi

Yeah, this is really close. I have attached some additional information that I hope helps explain this better. It has an illustration of a section of my form with the two drop downs in question and the email header that I want to populate. I used List Name in my workflow to get the product value to populate in my email header. Was trying to duplicate this process, but clearly List Name isn't producing my end goal.

Still new to Nintex and learning a lot. Appreciate the feedback and help. Your last sentence sounds like it will produce my end goal, but not sure exactly how to do this.


Alright, we're getting there happy.png 

For your MMR Type in the above screenshot, it looks as though your users can only select one option. Is that correct? Do you just need to extract the first 2 characters from ONE item, and put that in the email? 


Yes, that's correct. The users will only be able to select one option and then will need to extract the first 2 characters from the ONE item, and then put that in the email.


OH! Well, that's much easier then happy.png 

fn-Substring(01-Blahblahblah,0,2)  would return "01".  The problem is that your form will be showing the item with the ID appended.

What you can do is add a hidden calc that is parseLookup(MMRType) -- name this something like "MMRTypeParsed"

So if you use fn-Substring(MMRTypeParsed,0,2) in your workflow string you should be able to get the number.

You could also just get the number right in the form if you'd rather do it that way.

Maybe there is an easier way that folks have done -- ‌?


Thanks Rhia.

In another response you had provided:

Use "String" action to set a variable (let's say MMRCode) to: substring(parseLookup(MMRType),2,0)    (parseLookup is for if it is showing an ID at the front, like "45#;01-BlahBlahBlah" - it will automatically remove that.) Then just plop your MMRCode into your email notification.

In looking at this and this info above, trying to build this in the tool but not getting the return I am looking for. Most likely not doing something right or am missing a step. Would you be able to provide a step-by-step of how you would build this or do you have any screen shots to visually see this?


I was thinking of the form, as opposed to the workflow, previously. Ignore what I had, I removed it happy.png 


The above should leave you through step by step -- are you familiar with adding calculations onto your form?


Gotcha. Not too familiar with adding calculations onto the form. Any steps you can share?


For sure!

1) Drag the "Calculated Value" control onto your form.

2) Double click on your new action and name the control, then connect it to a column (so maybe create a MMRCode column to store the returned data to)

3) Click on the little "fx" to the right of the Formula field

4) When you reference another item, you need to double click it from the menus, you can't just type it in. When you've done it properly, it appears red with underlines. 

5) What you want is to first parseLookup (this will get rid of the ID from your MMRType), and then use THAT to get your substring of 2 items.

207160_pastedImage_1.png

(imagine that ApprovedBy is MMRType in your case)

6) Save, then, either set the Calculated Value to white text or hide it under something. 

7) Boom your MMRCode column will now have the code you need and you can reference in your email.

Let me know how far you get with this. Cheers!


Thanks so much for the steps. Easy enough to follow. I was able to build this out, but somewhere I am missing a connection as the email header returned missing information for that value. Here are some steps I took:


Thanks so much for the steps. Easy enough to follow. I was able to build this out, but somewhere I am missing a connection as the email header returned missing information for that value. Here are some steps I took:


Hey there!

You appear to be missing a comma between (MMR_Selection) and 0 in your calculated field. Should be subString(parseLookup(MMR_Selection),0,2)


Thanks for catching. When I updated and included the comma, it still returned no information in my header. I am stumped for sure.


The other thing it could be is that it looks like your MMR_Selection is a dropdown choice field so you probably don't need parseLookup


Thanks for that tidbit. I removed the parseLookup so that it's just the substring function. Unfortunately, still returning the same blank information when I run another test form.


After a co-worker took a look at the form and workflow we built, we discovered that there was a broken link within the form. After recreating this piece of our form, the information from the 2nd drop down selection populated as designed. We are good to go. Thanks for all of your insights and help.


Reply