Predefined participants - InfoPath Dev
in

InfoPath Dev

Predefined participants

Last post 12-23-2016 07:24 AM by Hilary Stoupa. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 12-21-2016 03:02 PM

    Predefined participants

    Hi,

    I'm struggling with a Filler form where I seem to fail at defining the appropriate structure/rules to support the requirements.

    My participants are as follows and they must all be unique:

    a) Requester
    b) 5 mandatory reviewers
    c) 2 reviewers that are required only if a "Risk assessment " dropdown is less than certain value: field < "03".  That drop down has values of 01, 02, 03, 04 and 05.
    d) 1 reviewer that is required only if the dropdown above is less than "02".
    e) 1 more reviewer dependent on the "Delivery Type" dropdown. 

    I've defined User Roles for each of those participants mapping to the AccountId in the structure below. 

    For the sake of consistency, I decided to use People picker(s) to allow the Requester to identify the reviewers but for c) d) and e), both dropdowns above can be modified after the fact by the first 2 mandatory reviewers, which would obviously change who's review is actually required.

    Also, since date pickers cannot be hidden, I decided to use a single Date picker to grab the review date and copy it to the current logged on reviewer's date.  I've toyed with the structure below and with the idea of a repetitive group but because specific reviewers are required only some of the time, unless I'm mistaken, the repetitive group does not seem to fit these requirements.

    Using the structure below, I'm able to hide/show the necessary reviewers using the "reviewRequired" field that gets updated as we go along. However, I can't seem to hide/show my capturing date picker* based on their role AND THEIR empty review date (since I can only have 5 conditions on the field). i.e. I only want to show the date picker if the reviewer had not already reviewed.  I'm trying to match the userRole() to the reviewRole and see if the "preceding" node for the reviewDate is empty. I can't seem to make that work.

    I'm struggling to write the appropriate rule(s). With 9 reviewers that would be 18 rules plus a couple more for other reasons on that section:
    1. if role is xyz AND reviewDate IS NOT blank: hide
    2. if role is xyz AND reviewDate IS blank AND reviewRequired = 0 : hide

     Also, how can I write a condition that will compare the number of empty dates for the required reviews? This formula does not seem to return the correct values:
    concat("-AccountIds: ", count(my:reviewers[//pc:AccountId != ""]), " -Required: ", count(my:reviewers[//my:reviewRequired = "1"]), " -Reviewed: ", count(my:reviewers[//my:reviewDate != ""])) 


    * Capturing date picker is a separate field that I'm using to transfer the date to the appropriate structure below through code behind. It is placed in a section to allow for hiding it.
    * Requester is handled separately because I grab their UserName() and they can't submit the form unless they provide me with their review date (using same Capturing date picker).

     

    Here's my non-repetitive structure. Again, it may not be the best design so I'm open to criticism and suggestions ;-)

     <my:reviewers>
      <my:engagementManager>
       <my:ppicker>
        <pc:Person>
         <pc:DisplayName></pc:DisplayName>
         <pc:AccountId></pc:AccountId>
         <pc:AccountType></pc:AccountType>
        </pc:Person>
       </my:ppicker>
       <my:review>
        <my:reviewDate xsi:nil="true"></my:reviewDate>
        <my:reviewRole>Engagement Manager</my:reviewRole>
        <my:reviewRequired>1</my:reviewRequired>
       </my:review>
      </my:engagementManager>
      <my:engagementLeader>
       <my:ppicker>
        <pc:Person>
         <pc:DisplayName></pc:DisplayName>
         <pc:AccountId></pc:AccountId>
         <pc:AccountType></pc:AccountType>
        </pc:Person>
       </my:ppicker>
       <my:review>
        <my:reviewDate xsi:nil="true"></my:reviewDate>
        <my:reviewRole>Engagement Leader</my:reviewRole>
        <my:reviewRequired>1</my:reviewRequired>
       </my:review>
      </my:engagementLeader>
      <my:functionalRRL>
       <my:ppicker>
        <pc:Person>
         <pc:DisplayName></pc:DisplayName>
         <pc:AccountId></pc:AccountId>
         <pc:AccountType></pc:AccountType>
        </pc:Person>
       </my:ppicker>
       <my:review>
        <my:reviewDate xsi:nil="true"></my:reviewDate>
        <my:reviewRole>Function RRL</my:reviewRole>
        <my:reviewRequired>0</my:reviewRequired>
       </my:review>
      </my:functionalRRL>
      <my:officeRRL>
       <my:ppicker><pc:Person>
         <pc:DisplayName></pc:DisplayName>
         <pc:AccountId></pc:AccountId>
         <pc:AccountType></pc:AccountType>
        </pc:Person>
       </my:ppicker>
       <my:review>
        <my:reviewDate xsi:nil="true"></my:reviewDate>
        <my:reviewRole>Office RRL</my:reviewRole>
        <my:reviewRequired>0</my:reviewRequired>
       </my:review>
      </my:officeRRL>
      <my:cbcRRL>
       <my:ppicker>
        <pc:Person>
         <pc:DisplayName></pc:DisplayName>
         <pc:AccountId></pc:AccountId>
         <pc:AccountType></pc:AccountType>
        </pc:Person>
       </my:ppicker>
       <my:review>
        <my:reviewDate xsi:nil="true"></my:reviewDate>
        <my:reviewRole>Firm RRL</my:reviewRole>
        <my:reviewRequired>0</my:reviewRequired>
       </my:review>
      </my:cbcRRL>
      <my:leadEngagementPartner>
       <my:ppicker>
        <pc:Person>
         <pc:DisplayName></pc:DisplayName>
         <pc:AccountId></pc:AccountId>
         <pc:AccountType></pc:AccountType>
        </pc:Person>
       </my:ppicker>
       <my:review>
        <my:reviewDate xsi:nil="true"></my:reviewDate>
        <my:reviewRole>Lead Engagement Partner</my:reviewRole>
        <my:reviewRequired>1</my:reviewRequired>
       </my:review>
      </my:leadEngagementPartner>
      <my:qaReviewer>
       <my:ppicker>
        <pc:Person>
         <pc:DisplayName></pc:DisplayName>
         <pc:AccountId></pc:AccountId>
         <pc:AccountType></pc:AccountType>
        </pc:Person>
       </my:ppicker>
       <my:review>
        <my:reviewDate xsi:nil="true"></my:reviewDate>
        <my:reviewRole>QA Reviewer</my:reviewRole>
        <my:reviewRequired>0</my:reviewRequired>
       </my:review>
      </my:qaReviewer>
      <my:secPPD>
       <my:ppicker>
        <pc:Person>
         <pc:DisplayName></pc:DisplayName>
         <pc:AccountId></pc:AccountId>
         <pc:AccountType></pc:AccountType>
        </pc:Person>
       </my:ppicker>
       <my:review>
        <my:reviewDate xsi:nil="true"></my:reviewDate>
        <my:reviewRole>SEC PPD</my:reviewRole>
        <my:reviewRequired>0</my:reviewRequired>
       </my:review>
      </my:secPPD>
      <my:auditEngagementPartner>
       <my:ppicker>
        <pc:Person>
         <pc:DisplayName></pc:DisplayName>
         <pc:AccountId></pc:AccountId>
         <pc:AccountType></pc:AccountType>
        </pc:Person>
       </my:ppicker>
       <my:review>
        <my:reviewDate xsi:nil="true"></my:reviewDate>
        <my:reviewRole>Dept Engagement Partner</my:reviewRole>
        <my:reviewRequired>0</my:reviewRequired>
       </my:review>
      </my:auditEngagementPartner>
     </my:reviewers>
     
     
     

     


    Josée Sévigny
  • 12-23-2016 07:24 AM In reply to

    Re: Predefined participants

     Hi, Josée - this is the same form as we were talking about in your other post, I think? When I need to hide a date picker or a people picker (or a picture button, or other controls like that) I put the control in a section and hide the section. I think at this point you've probably got your XPath issues worked out (based on our other thread) - is there anything here you still need help with?

    So you know - in general I would use a repeating structure for something like this. Under the data tab in the ribbon I would add as many instances as I needed and set the values of the reviewRole, etc. But then if you need to change reviewRequired based on other things, it can get a little tricky - needs to use code (or qRules, or a minor manifest hack) to set a filtered node's value. Or add a helper node to the repeating structure for that logic (I'd use an attribute called "set" for example, and when the user selects a form type, set "set" to 1, have rules on the attribute to set reviewRequired, etc.). This is mainly because I'd much rather have a repeating structure and have fewer rules to manage. :) 

    Hilary Stoupa

Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.