Word Documents Event - How to update multiple content controls?


Badge +9

Hello everyone,

 

I'm using K2 for Visual Studio, and I'm wondering how one goes about updating multiple content controls in the Word Documents Event Wizard?  I can update one fine but I need to update a lot.  Basically I am making a Word document of my InfoPath form, so I'm hoping praying that I don't need an event for each individual field/content control.

 

Thanks in advance!


5 replies

Badge +5

A single event may only let you update a single control and your problem might take multiple events. I'm not completly sure though and I'm looking into it. In the meantime, I found this blog post

 

http://www.srinivasvangala.com/2012/07/update-document-content-fields-through.html

 

Though from what I can tell he is updating the content of a docment which is not exactly the same as what you are doing, but it's worth taking a look while I try to figure out if what you want is possible to do/how to do it.

Badge +9

Thanks, I did see that post already but I don't want to edit code.

Badge +2

K2 really needs to implement this. There seems to be only one single-value field for Content Control Name. I'm in the same situation where I have hundreds of content control fields and thus would need hundreds of Update events. This is business need and I am surprised it is not available. Thanks.

Badge +5

I could be wrong but I THINK it was mentioned that something to handle these kinds of situations is being worked on for a future release, as I've seen a few forum posts with people trying to do something similar to your situation.

Badge +9

So I was OK with doing this individually (or rather, I made peace with it) but now I have encountered two issues.  I'm wondering if anyone has a solution?


1. Repeating fields - I saw Word allows content controls to "repeat" but I have yet to get it to work in K2 with repeating fields.  Has anyone had success?  I tried a repeating activity in K2 workflow but it just overwrites the first occurence of the repeating content control, always.  Specifically I wish to output the results of a SmartObject GetList method.

2. Hyperlinks - how to create a hyperlink using two fields with Word content controls (1 for the URL, and 1 for display text)?

Reply