View Single Post
 
Old 09-06-2022, 12:20 PM
Peterson Peterson is offline Windows 10 Office 2019
Competent Performer
 
Join Date: Jan 2017
Posts: 141
Peterson is on a distinguished road
Default

Quote:
Originally Posted by Guessed View Post
As far as I know you can only bind a single xml node to a content control.

I've had no problem binding a node to a dropdown CC and the method is no different to binding a node to a plain text CC. The only complexity with dropdown CCs is that each entry has a display name and a value. The value is what gets stored in the XML node.

Are you trying to populate the dropdown CC options with multiple nodes? As far as I'm aware, that isn't dynamic and you would need to use code to clear the dropdown list and repopulate it from the xml data. This is not mapping.
Correct: I'm trying to populate the dropdown CC options with multiple nodes. I can see it done with SharePoint-injected column lists, and in the Eric White video in my initial post.

I need to use custom XML because the template I'm working on already uses it extensively, and all data bound to content controls must reside in custom XML; a design requirement is that data can't be in built-in doc properties or the body of the doc.

At one point while trying to create a dropdown content control mapped to a custom XML node, the dropdown items were showing up in document.xml. However, I was not including both names AND values, so it sounds like I need to go back and try that approach. Finally, the dropdown item nodes would be static: it's a list of ~50 items that will never change.
Reply With Quote