How to get field value from the additional lookup fields?

rss

Posted by eedoh - Mar 11 ’14 at 11:08

Here's the example... I have a list, let's call it "The List". In The List I have a column called "The Column" and it's of Lookup type. The Column is a lookup to "The List2" list, particulary the Name field, but it also has additional field selected from the same list (The List2), ID field for example.

I have no problems selecting "The Column" field value on "The List" form
var TL2Name = fd.field('The_x0020_Column').control().value();

In the other hand, every time I try to read the value from  "The Column:ID"
var TL2ID = fd.field('The_x0020_Column_x003a_ID').control().value();
I get "undefined" value, although I'm using correct internal name.

Is there a way around this?

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 9 years 6 months 8 days
    #1 by Dmitry Kozlov Mar 12 ’14 at 02:57

    Hello,

    First, you should place the additional column onto your form. Then you can use the following code to get its value:

    fd.field('The_x0020_Column_x003a_ID').control()._el().text()

    Please, note, that the values of additional fields are loaded only after the form saving.

  • eedoh
    Member
    Member for: 9 years 1 month 26 days
    #2 by eedoh Mar 12 ’14 at 05:58

    [#1]: It worked. Thanks

  • harper1898
    Member
    Member for: 1 year 4 months 5 days
    #3 by harper1898 Nov 24 ’21 at 06:31
  • eugenbaudeer
    Member
    Member for: 1 year 4 months 5 days
    #4 by eugenbaudeer Nov 24 ’21 at 12:02

    Choice fields are not permitted to be used as lookup columns, as I now understand. So, on the content type, I added a calculated "single line text" field that strings out the value of my Yes/No field. Android Mobile App Development agency Choice fields are not permitted to be used as lookup columns, as I now understand. So, on the content type, I added a calculated "single line text" field that strings out the value of my Yes/No field.

  • eugenbaudeer
    Member
    Member for: 1 year 4 months 5 days
    #5 by eugenbaudeer Nov 24 ’21 at 12:04

    http://forum.spform.com/

    <a href="http://forum.spform.com/">try</a>

  • peter0900
    Member
    Member for: 4 months 20 days
    #6 by peter0900 Mar 28 ’23 at 04:52

    Choose a value from the list by clicking the list's arrow. With a lookup field, you can also choose an option by entering the first few values of the entry and then choosing from the results.

    Best Ceiling Tiles Company Near Me in USA

Displaying 1 to 6 of 6 messages