Related Item Values

rss

Posted by Cloud.Ed - Aug 18 ’16 at 12:45

How would I get the value of multiple related items in the related items control? If we wanted to get every value from cloumn 3 and concatinate them into a single string for instance? The related item contron is set to render in client, quick edit only.

 

Thank yoiu.

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 5 years 9 months 26 days
    #1 by Dmitry Kozlov Aug 19 ’16 at 05:45

    Hi,

    You can retrieve values from the related items control following way:

    var rows = fd.relatedItems(0).data('ctx').ListData.Row;
    for (var i = 0; i < rows.length; i++) {
        alert(rows[i].Title);
    }
    

    Where 'Title' is the internal name of the required field.

  • GerardoFlores
    Member
    Member for: 1 year 4 months 2 days
    #2 by GerardoFlores Mar 29 ’18 at 05:14

    [#1]: Hi Dmitry,

     

    Im using this code, but when i add new item in quick edit related item mode and perform FOR in javascript this count one more item per added row and the and the result of sum is wrong, do you know what this problem is?

    Regards.

Displaying 1 to 2 of 2 messages