There are many threads that almost get at my question but not quite and their answers aren't helping.
I've got SharePoint 2013, I've got InfoPath 2013, and I'm using SharePoint Designer 2010 and creating a 2010 workflow with an Infopath form associated with that workflow. Here's what I'm trying to do:
My Goal: I want my InfoPath form to hide a section of parameters based on the current value of a field from the item in the Sharepoint list that the workflow is being run on.
I feel like I've got something here that should be working which is:
- Add Data Connection in InfoPath
- Make it a new connection to 'Receive Data'
- Receive my data from a 'Sharepoint library or list.'
- Choose the list that I'm running the workflow on
- Select the field (a 'Choice' field with 4 different options called 'Platform')
- I checked 'Store a copy of the data in the form template' just for good measure although I don't think it's necessary
- I checked 'Automatically retrieve data when form is opened'
- Create a 'Section' in my InfoPath form
- Place the fields I want to hide based on a rule inside of that Section
- Create a rule on that 'Section'
- Edit the Condition of the rule
- I have to find the 'Platform' field for the first drop down in the Rule condition
- Click 'Select field or group'
- Click the List name from the 'Data source' drop down
- Expand myfields, see both 'queryFields' and 'dataFields' folders both which contain the 'Platform' field
- I've tried both of the 'Platform's in queryFields and dataFields and neither work. Let's assume for now I selected the 'Platform' field under 'dataFields' folder
- Finish the condition 'Platform is equal to "PC"' and click OK
- Check the box 'Hide this control'
- Save and publish InfoPath form
- Test the InfoPath form by running the workflow on an item whose Platform is equal to PC
- The fields inside the section are hidden successfully! Okay let's make sure the opposite happens when the Platform field doesn't equal 'PC'
- Test the InfoPath form by running the workflow on an item whose Platform is equal to 'Mac'
- The fields inside the section are hidden here as well. Not successful. It's hiding the fields no matter what.
This happens when I select the 'Platform' field under the 'queryFields' parent folder as well (as referenced in Step 15 above.) I also just dropped the 'Platform' field inside of the Form just to see what data it's pulling and it displayed the Platform value of all 11 items in my test SharePoint list. So, it seems like the problem is that the field Platform is by default pulling all values of the field in the List rather than just for the specific item that the workflow is being run on. How do I tell InfoPath to grab the 'Platform' value just for one ID (the one the workflow is being run on)?
Can anyone tell me what I'm missing here or maybe a clue to get me on the right path? Thank you for your help!