passing choice column additionalAttributes in AddFieldAsXml

Iron Contributor

I am using a PnP solution to create a custom solution from


The method AddFieldAsXml takes somes parameters

If i want to pass a choice column then how we go about puttingthe choices.


AddFieldAsXml(requestList, SiteRequestFields.StateML, SiteRequestFields.cmdMultipleDisplayName, SiteRequestFields.cmdMultipleDisplayId, "Choice", "Format='Dropdown' Xml='<Choices><Choice>Test1</Choice><Choice>Test2</Choice><Choice>Test3</Choice></Choices>'");


However the above code did not work.



1 Reply

Per link below, choice XML elements should be all caps (XML is case sensitive).  I haven't tested this yet though.