When developing a SharePoint form + workflow solution, the best choice (IMHO) is to use InfoPath + Nintex Workflow. There are many (MANY) considerations – but I’m just touching one that I think it worth a call-out.
When you publish an InfoPath form – you can choose which columns to ‘promote’.
These become SharePoint columns within the list – and that’s great for doing FILTER and GROUP functions – or for use in DVWP’s.
But – they can be a headache – especially when deploying forms from DEV, to UAT, to PROD.
If you’re not careful, you can end up with duplicated column names – with internal names like “Department0”, “Department1”, “Department2”, etc.
The trick is to “take your time” when pushing the form to another server environment. Make sure to follow these steps
- Double-click the column name
- Change the dropdown from “Create New” – to “This Form Library”
- Choose the column – ie. match the InfoPath column with the (existing) SharePoint column
BUT – as the topic of this blog post tells – you don’t need to (shouldn’t need to) promote LOTS of fields – especially if you don’t need to.
*IF* you are simply promoting fields for use within a Nintex Workflow – then STOP. There is a better way.
- Don’t promote the field (eg. Date Commencing)
- Within the Nintex Workflow – use the “Query XML” action to get the value
- The field will still be WITHIN the SharePoint item (InfoPath form)
- It’s only ONE step to get the value – then use the variable within the workflow ‘logic’
It’s THAT easy ! Don’t believe me….?
Well, lemme show you…
Get the XPath for the field you need
- Within InfoPath – find the field you need/want – within the Data Source (Main)
- Right-click and choose “Copy XPath”
- Nothing will happen – but the full XML schema node structure is copied to your clipboard
Retrieve the value within Nintex Workflow
- Within your Nintex Workflow, add a “Query XML” action – within the “Integration” section/group
- Click “Configure”
- Leave the dropdown for “Current Item” – ie. the InfoPath form (XML)
- Change the second dropdown for “Process Using” – to be “XPath”
- Paste in your value copied from InfoPath (as above)
- Define a variable – and select it (eg. DateCommencing)
That’s it ! You can now use the variable/value – within the workflow.
This is only ONE extra step to get the value – very easy via “Query XML” – and, no need for a promoted field.
And that is a VERY good thing – when it comes to deployment (to PROD).
Hope that helps – it’s certainly one of my favourite features – no more promoted fields !
(Having said that – it’s valid to have promoted fields for List ‘views’ – grouping, filtering, and search/indexing).