Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am building an event handler. When items in a library on one server farm are updated or deleted, I take that information and ammend a list that resides on another site. I require that one of the fields "Search" contains a space character. Only that, nothing else. I have tried the following 4 different methods with no success. The item gets created or updated but the 'Search' field is blank, whereas it needs to hold a space character. I'm stumped.

    "<Method ID='1' Cmd='Update'>" +
    "<Field Name='ID'>IDVALUEOFITEM</Field>" +
    "<Field Name='Search'> </Field></Method>" +

    "<Method ID='1' Cmd='Update'>" +
    "<Field Name='ID'>IDVALUEOFITEM</Field>" +
    "<Field Name='Search'>" + "&nbsp;" + "</Field></Method>" +

    "<Method ID='1' Cmd='Update'>" +
    "<Field Name='ID'>IDVALUEOFITEM</Field>" +
    "<Field Name='Search'>" + "<![CDATA[ ]]>" + "</Field></Method>" +

    "<Method ID='1' Cmd='Update'>" +
    "<Field Name='ID'>IDVALUEOFITEM</Field>" +
    "<Field Name='Search'>" + "&#160;" + "</Field></Method>" +

Without quotes around the various items eg. " " I get a compiler error.

share|improve this question

1 Answer 1

This is just a wild guess, but what happens when you try:

"<Field Name='Search'>' '</Field></Method>" +

or even

"<Field Name='Search'>"+" "+"</Field></Method>" +

oooh, or what about

"<Field Name='Search'>"+"%20"+"</Field></Method>" +
share|improve this answer
    
I have tried " " I think I tried "%20" as well, but I can't recall so I will try %20 and ' ' thanks for the suggestions. I'll let you know. –  Linton Caldecott Jan 25 '13 at 4:40
    
Ok so, "+"%20"+" and ' ' put in the literal strings ' ' and %20 in that field on the target list. :\ –  Linton Caldecott Jan 25 '13 at 4:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.