0

I would like to use UpdateListItems or something similar to allow my users to pass in some variable (e.g., a name) so I can use a caml query to find all items where SomeUserField = 'John B Smith' and replace that field with the value that they enter.

I see here: http://spservices.codeplex.com/wikipage?title=UpdateListItems that there is an "ID" parameter which makes it seem like I can only use this to update a single item.

Is it possible to have this change happen for all items where that query is true using only JavaScript/jQuery?

1 Answer 1

1

To do a batch update query where the IDs are not known, you need to use this action: SPUpdateMultipleListItems.

Example from the documentation:

$().SPServices.SPUpdateMultipleListItems({ listName: "States", CAMLQuery: "<Query><Where><Eq><FieldRef Name='Status'/><Value Type='Text'>Active</Value></Eq></Where></Query>", valuepairs: [["Status", "Inactive"]] }); 
0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.