<Method ID="1" Cmd="New">
<Field Name="FirstName">John</Field>
<Field Name="LastName">Doe</Field>
<Field Name="Email\">johndoe@johndoe.com</Field>
</Method>
So now you want a field where the user can select multiple items, and these items are populated from another list. Let's say there is a section on a form that allows a user to sign-up for multiple mailing lists. On the back-end these would be managed in their own list, "Mailing Topic", and would be the source for our lookup column. We will call the lookup column "My Subscriptions". Here is the contents of our "Mailing Topic" list:
ID Topic Name
1 New Hires
2 Promotions
3 Leaving
We will submit the same CAML, but with the new field added and all three options included:
<Method ID="1" Cmd="New">
<Field Name="FirstName">John</Field>
<Field Name="LastName">Doe</Field>
<Field Name="Email\">johndoe@johndoe.com</Field>
<Field Name="MySubscriptions\">
1;#New Hires;#2;#Promotions;#3;#Leaving
</Field>
</Method>
The format is: ID#;Lookup Field Value. Separate additional values by ";#". If you look in the list with the lookup column after a successful submission, you will see all the items, but minus the #;ID's and delineated with a comma instead.
2 comments:
This is WRONG
ID#;Lookup Field Value
This is RIGHT
ID;#Lookup Field Value
scottish singles [url=http://loveepicentre.com/]talk to singles knoxville tn[/url] dating services comparisons http://loveepicentre.com/ black man dating white woman
Post a Comment