1

I am trying to update share point list item using rest api.

I can update Item using ID but I want to Update that item which column Name Title is like "DA5000" its unique field so can I do this ?? if yes then how to achieve this..?

I was try to update using ID its work well but I want to Update using title item value

Any Help will Appreciated

Thanks in advance..

1
  • 1
    Could you add some Background as to why you want this? Might give more and possibly better solutions Commented Apr 14, 2016 at 8:24

1 Answer 1

1

Well, it depends how you are getting the item.

If you are getting it via the URL like this:

/_api/lists/getbytitle('News')/items(50)

Where the number in the brackets "(50)" is the item ID you can get an item e.G. like this:

/_api/lists/getbytitle('News')/items?$filter=Title eq 'FAQ'

So the URL is looking for an item, where in the title column FAQ is the content.

In general:

/_api/lists/getbytitle('<ListName>')/items?$filter=<InternalColumnName> eq '<Value>'

To check the internal column names you can just use this:

/_api/lists/getbytitle('<ListName>')/items

Then use that name for the in the filter.

Hope this could help.

8
  • I was tried it but its give 400 bad request error Commented Apr 14, 2016 at 7:54
  • updated answer. Could you add the output of that (the column you want to filter) in your question? Commented Apr 14, 2016 at 7:59
  • patrick i want to filter title column. have you try to update like this before? is it work? Commented Apr 14, 2016 at 10:32
  • actually in my when i approve in my one list then one random unique string generate and add in this list.so i don’t have that item ID .but i have that string so i want to update on that. Commented Apr 14, 2016 at 10:35
  • 1
    As Patrick mentions in his answer, you need to do two REST calls. First to get the ID of the item, then to update. Commented Apr 14, 2016 at 12:02

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.