1

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.

1 Answer 1

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>" +
2
  • 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. Jan 25, 2013 at 4:40
  • Ok so, "+"%20"+" and ' ' put in the literal strings ' ' and %20 in that field on the target list. :\ Jan 25, 2013 at 4:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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