Get SPS List elements by any attribute/column data

  • 31 January 2006
  • 1 reply
  • 1 view

Badge +2
Hi,

I'm in trouble with SPSList and it's capabilities.

I'd like to do the following scenario:

- There is an infopath form somewhere on a sharepoint site. This infopath form has a repeating table with Project Members' attributes (ie. member's name, it's role in the project etc...)

- There is a Sharepoint custom list somewhere else on the same site. This contains the list of the active members of all active projects. It has a column "Project ID" which is a required field in each list items.

I would like to implement the following:

After the Project Manager submits the form, K2 should verify the consistency of the repeating table of the infopath form and the SPS list
If they are not consistent, SPS list should be updated based on the modifications in the form's repeating table, like:
- new rows added on the form should be added to the SPS list.
- modified rows on the form should be modified in the SPS list.
- removed rows on the form should be deleted from SPS list.

A vital point in this function is that I should get a list of SPS List elements back from SPS List by _any_ non-unique column data (by the value of "Project ID" column in this case), and not by an unique ID.

How can I do this? Can I do this with any of the K2 Classes, Methods or Web Services?

Thank in advance!


matyas

1 reply

Badge +2
Hi

Unfotunately this is not possible with any K2 Classes.

You would have to write your own web service that can handle this. One can retrieve list items by using the SpQuery object in the Sharepoint object model.

For more on writing your own web service: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_sp2003_ta/html/odc_writingcustomwebservicesforsppt.asp

Regards

Reply