I have 2 drop down fields "City" and "Country". I want a calculated column which will display the first 2 letters from the value selected in drop down fields

Please suggest


Assuming you have Sharepoint deisgner 2013, you can do this at the workflow level. There is an action called "Extract Substring from Start of String". When a user inputs the City and Country fields, use this action to take the first two letters of each field value, and store it in the column you want to have displayed.

EDIT: Updated old answer with answer to original question.

Without having workflows do this, the other way to add this column would have this formula in a calculated column:

CONCATENATE(LEFT([City],2), ",", LEFT([Country],2))
| improve this answer | |
  • 2
    Yes! Let's say city column is called "City", and country column is called "Country". You can have a calculated column, called whatever, and write it's calculated formula as CONCATENATE(LEFT([City],LEN(2)), ",", LEFT([Country], LEN(2))) – Brandon C. Jun 10 '14 at 10:24
  • 1
    Change the numbers from 2 to 3 and you should be good! – Christoffer Jun 10 '14 at 10:40
  • 1
    Try changing the LEN(#) to 3. I'm not too familiar with how the LEN function works. Let me look it up a bit more. – Brandon C. Jun 10 '14 at 10:43
  • 1
    msdn.microsoft.com/en-us/library/office/… This is an excellent reference when working with calculated formulas. – Christoffer Jun 10 '14 at 10:45
  • 1
    I think you can write LEFT([City],2). Sorry, I was looking at the declaration for LEFT() wrong. The LEN() function returns the length of a column, you don't put integers into the parameter field for that. – Brandon C. Jun 10 '14 at 11:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.