0

I have two lists, list1 with coulmn1.1 which is number column.
I want list1 column1 value to catch and show in list2 column2.1 on new form.

<script src="http://sitename/SiteAssets/jquery-2.2.4.min.js"></script>
<script type="text/javascript">
 $(function(){
 jQuery.ajax({
  url: " http://sitename/_api/_api/web/Lists/getByTitle('ListName1')/items?$filter='NameOfColumn1.1',
             type: "GET",
             headers: { "accept": "application/json;odata=verbose" },
             success: function(data) {
              var data = data.d;
              /* Part which I don't know*/
              },
            error: function(xhr, textStatus, errorThrown) {
            alert("error:"+JSON.stringify(xhr));        }
         });
  });

If you could explain me what should I add or edit in code so it can be workable.

  • You want the to take the column value of the List 1 and use as a filter in the List 2? – Thales Chemenian Nov 4 '16 at 12:45
  • no. I want to show that column in list2's new form – Danilo Nov 7 '16 at 11:07
  • Ok, but you have more than one item in the list1? Wich item is going to be shown in the newform of the list 2? – Thales Chemenian Nov 7 '16 at 12:32
  • Sorry on my incomplete question. Based on user who is opening new form in list2 I want to catch column1 from list1. More detail in list1 I have items based on users (each user has it's item) and when one of them creates new item in list2 I want to show column1 from list1. – Danilo Nov 7 '16 at 12:39
  • Right, another question, the column that has the user is a person/people column? – Thales Chemenian Nov 7 '16 at 12:42

Your Answer

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

Browse other questions tagged or ask your own question.