cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Convert alpha info into a numeric value

Jump to solution

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.

0 Kudos
Reply
11 Replies
Workflow Hero

Re: Convert alpha info into a numeric value

Jump to solution

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

Reply
Workflow Hero

Re: Convert alpha info into a numeric value

Jump to solution

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:

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.

Reply
Workflow Hero

Re: Convert alpha info into a numeric value

Jump to solution

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.

Reply
Workflow Hero

Re: Convert alpha info into a numeric value

Jump to solution

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

Reply
Workflow Hero

Re: Convert alpha info into a numeric value

Jump to solution

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.

0 Kudos
Reply
Workflow Hero

Re: Convert alpha info into a numeric value

Jump to solution

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?

0 Kudos
Reply
Workflow Hero

Re: Convert alpha info into a numeric value

Jump to solution

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 ({ItemPropertiesSmiley Frustratedelection},0,2)

Reply
Workflow Hero

Re: Convert alpha info into a numeric value

Jump to solution

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.

0 Kudos
Reply
Workflow Hero

Re: Convert alpha info into a numeric value

Jump to solution

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:

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

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:

To decide what you want:

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

Reply