Problem setting values of an InfoPath form from SharePoint Designer based workflows
This is something that threw me for a bit a week or two ago, and I didn’t blog about it then, and today I came across the same thing and got just as lost, so I’m gonna write it down this time! Here is the scenario – you have created an InfoPath form and published it to a forms library. The form has a few properties in it that you want to be able to work with in SharePoint designer workflows (your workflow might need to update a value in the form for example).
Now the first step that I knew needed to be taken was to “promote” the properties within InfoPath. This puts them into the SharePoint list so that I can manipulate views based on the values in the form, and it looked like what I was after. You get to the property promotion window from the form options dialog (go to the backstage view, and select form options, then choose “Property promotion” from the left). When you create a promoted property here this is what you get:

Go and publish the form, you will notice that when you go into SharePoint designer and try to do something like set a field in the current item, you don’t see your promoted field – what the? It’s promoted, I should be able to work with it right? Well true – but there is a trick to this, and I think that Microsoft screwed up the UI here totally.
When you publish a form and choose to publish it to SharePoint (not using the quick publish, run through it all like the first time you published the form) you will see that one of the things it asks you about is your promoted properties,giving you the option to set them here instead of in the form options dialog like we did earlier. Here is the thing though – click modify on one of the properties and look at the window it gives you,it will look like this:

Notice the bottom of the form – we have an options here that we didn’t have before! First of all we can choose the group for the site column to go in, which is good from the point of view of managing them, but the more important option is one at the bottom – “Allow users to edit data in this field by using a datasheet or properties page”. This is the magic box to tick! Once you enable this for your promoted property and publish the form again, it will show up in SharePoint Designer in all the places you would expect it to!
So there you have it, easy when you know where to look – but not consistent from a UI perspective – if I am modifying a promoted property, it shouldn’t matter where I change it, I should get the same options in both places. Hopefully this gets addressed at some point!
Comments
No comments yet. Be the first!