Get Lookup value of another column


Posted by jcmeyer - Jul 7 ’14 at 03:30

I have a list with 3 columns:

FileNumber, ContactPerson, City

FIleNumber is unique


In another list I have a lookup column on 'FileNumber'.  I want to pass the value of column ('City') to a variable after selecting the associated FileNumber.  I will then set the value of City in the new form automatically onChange to FileNumber lookup.


I can get the record ID of the lookup using fd.field('Lookup').value

I can get the text of the lookup (FileNumber) using fd.field('Lookup').control('getSelectedText');

Is there any way I can get the text of City after selecting a FileNumber in the lookup?


Thank you

  • Dmitry Kozlov
    Dmitry Kozlov
    Member for: 8 years 10 months 17 days
    #1 by Dmitry Kozlov Jul 8 ’14 at 03:35


    Unfortunately, you cannot retrieve additional columns of a lookup value dynamically. But you can try our Cross-site Lookup column that allows to request additional column and save them into a hash-table inside the 'Item format' function. Next you can get all these columns by the selected key value on a form via JavaScript.

  • jcmeyer
    Member for: 8 years 1 month 1 day
    #2 by jcmeyer Jul 8 ’14 at 09:11

    as an alternative I can return additional columns with the standard sharepoint lookup and display the additional columns in another form.  The user must select the related item from a lookup dropdown and submit to see the changes.

    I have tried adding a button with the following onclick event as described in another forum post, but it does not seem to be working; basically I want to submit the form but not close the form (New or Edit form).

    return true;

    Is there anything else I need to add to the onclick event to submit and return to the same form?  or, any way to show the values of the additional lookup columns once the primary lookup dropdown is selected?

    thank you very much.


  • Dmitry Kozlov
    Dmitry Kozlov
    Member for: 8 years 10 months 17 days
    #3 by Dmitry Kozlov Jul 9 ’14 at 03:55

    [#2]: Hi,

    Please, read the following post to get information on how to redirect users to the edit form right after creation of an item:

    With regard to the edit form, you can place a new save button in addition to the existing ones called 'Save without closing' and put the following code into its OnClick handler:

    return true;

    More info:

    If it doesn't work for you, please, send HTML-source of your form page to [email protected]

Displaying 1 to 3 of 3 messages