passing choice column additionalAttributes in AddFieldAsXml

Highlighted
Regular Contributor

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

https://github.com/SharePoint/PnP/tree/master/Samples/Provisioning.ReR

 

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.

 

Thanks

0 Replies