Convert alpha info into a numeric value


Badge +6

In the Nintex form I am building, I have a drop down list where the end user will make a selection from 11 possible options. The selected option is then included in the subject line of an email that is sent to another group. However, I need to convert the alpha info into a numeric value. In order to make my example simplistic, let’s say the drop down has 11 colors to choose from. The first selection in the list is Blue and it would have a numeric value of 1; next would be Red and it would equal 2…and so forth until the last color having a numeric value of 11. Instead of listing “Blue” in my email subject line, I need it to show as the numeric value of 1. Thanks in advance.


11 replies

Badge +16

where do you keep the pairing of alpha and numeric values?

Userlevel 5
Badge +13

Piggybacking off of what Cassy is asking, I think she's going to recommend you have a list where you have a column "color" and a column "number" and basically, in your workflow, you lookup what number you need. Effectively, this separate list is your "key." 

So let's pretend you have a list realList where your current workflow that sends the emails lives which has a column called "pick a color", then you have another list called key that stores the "color" and "number" columns. In your workflow, you could set a variable and have it look up what the appropriate number for the selected color is. Like so:

206650_pastedImage_1.png

Then use that newVar in your email subject line. This also allows you to, at any time, change the number-color associations in that key list without editing your workflow.

Badge +6

Thank you both for the information. I am newer to Nintex and so learning on the fly and leaning on the experts. Currently the alpha part is just a list within my form but the numeric part is just sitting in an excel, next to the alpha for a lookup. I think the above sounds doable and easy enough. Appreciate the insights, direction, and screen shot.

Badge +16

‌ you know me so well and thank you for taking more time than I did to explain the setup I had in mind.  happy.png 

Userlevel 5
Badge +14

would it be an option for you simply to prefix text with its related number?

like: 01 - Blue

this way you could simply substr() first two characters out of selected value and you are done.

Badge +6

That would work as well. Since I am still a newbie to Nintex, need a little help. I created the calculated value for the substring to connect with just the first two values (in this example 01). How can I now connect this value to the email subject line?

Userlevel 5
Badge +14

I assume you save selected value to a list field.

then you can directly place a formula with inline function into subject line field to get substring of first two characters. use an icon next to subject line field to open formula builder.

formula will look like fn-SubString ({ItemProperties:Selection},0,2)

Badge +6

This is where I still need some hand holding. Thanks for your patience and expertise. I created the value for the drop down list I have with these 11 selections (for this email example would be the colors). However, I don't seem to be able to connect the value to the "choice" list. I feel I am missing a step or two. Any thoughts or screen shots would be valuable. or I can provide what I have so far.

Userlevel 5
Badge +13

Hey Jeremy, can you give some screenshots of what you have right now and where you're getting tripped up? Also, are you in Nintex 2016, 2013, or O365? 

For me, in 365, I don't have the ability to use inline functions like Marian is talking about in my email subject. So, what you could do, if you want to use her method (make your choices things like 01 - Blue; 02 - Red; 03 - Green; etc), is use an "extract substring from start of string" action in your workflow, like so:

206708_pastedImage_1.png

Once you have that, in your email subject line, you can do like this:

206709_pastedImage_2.png

To get your variable, you can either use the "Insert Reference" in the right hand pane, or click the "Advanced Lookup" and get your variable that way. The benefit of the latter, is that, depending on your variable type, you could format it. For example, with people picker fields, you can click the little orange "fx" button:

206710_pastedImage_3.png

To decide what you want:

206711_pastedImage_4.png

For your particular case here, that's not an issue because your text variable is just going to be a string.

Badge +6

Awesome. Thanks so much. I was able to get this to work. Appreciate all of the insights and suggestions.

Userlevel 5
Badge +13

Hey Jeremy, if Marian or I answered your question, can you mark it as correct? It should be a button on or near the answer. This helps others find answers quickly!

Reply