0

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:

  1. Add Data Connection in InfoPath
  2. Make it a new connection to 'Receive Data'
  3. Receive my data from a 'Sharepoint library or list.'
  4. Choose the list that I'm running the workflow on
  5. Select the field (a 'Choice' field with 4 different options called 'Platform')
  6. I checked 'Store a copy of the data in the form template' just for good measure although I don't think it's necessary
  7. I checked 'Automatically retrieve data when form is opened'
  8. Create a 'Section' in my InfoPath form
  9. Place the fields I want to hide based on a rule inside of that Section
  10. Create a rule on that 'Section'
  11. Edit the Condition of the rule
  12. I have to find the 'Platform' field for the first drop down in the Rule condition
  13. Click 'Select field or group'
  14. Click the List name from the 'Data source' drop down
  15. Expand myfields, see both 'queryFields' and 'dataFields' folders both which contain the 'Platform' field
  16. 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
  17. Finish the condition 'Platform is equal to "PC"' and click OK
  18. Check the box 'Hide this control'
  19. Save and publish InfoPath form
  20. Test the InfoPath form by running the workflow on an item whose Platform is equal to PC
  21. The fields inside the section are hidden successfully! Okay let's make sure the opposite happens when the Platform field doesn't equal 'PC'
  22. Test the InfoPath form by running the workflow on an item whose Platform is equal to 'Mac'
  23. 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!

  • Just thinking about it.. what is the workflow doing? Who is setting the platform field? A user? When you open the form is it an edit version of an individual item or a new form? A new form will run the rule against all items in the list, where as, you could have a rule in the form itself to hide sections based on fields. I can understand what you're trying to do, just a little confused on where the workflow fits in and how you are attempting to use the form. – SPChick Jan 22 at 1:23
  • Hi @SPChick. 1. What is the workflow doing? The workflow is sending an email to a group of people. The group of people changes depending on the value of the field 'Platform' (PC or Mac) that the workflow is being run on. 2. Who is setting the platform field? A few users of the list (which is a Calendar actually to be more specific.) 3. When you open the form is it an edit version of an individual item or a new form? This is a Workflow Initiation Form. This workflow will be manually started via Custom Action button on a per item level. – onett199x Jan 23 at 15:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.