Two Separate People Picker Controls - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Two Separate People Picker Controls

Last post 10-01-2020 12:37 PM by silvercar217. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 09-30-2020 11:58 AM

    Two Separate People Picker Controls

    Greetings,

    I have a browser form that is touched by 2 different people. It is filled out and submitted by Person1 and then Approver1 needs to open the item and make some selections. I have 2 views: Input and Approver. I have one people picker on the Input view that autofills according to the action rule:
    Condition: /my:myFields/my:BasicInformation/my:Person1/pc:Person/pc:AccountId is blank,
    Run these actions: Set a field's value: /my:myFields/my:BasicInformation/my:Person1/pc:Person/pc:AccountId = userName()

    This works just fine. When the form is submitted for the first time I set a boolean control ReadyForReview = TRUE. When the item is clicked on in my SharePoint library, the Form Load rule loads the Approver view. In this view all controls are calculated values so that Approver1 cannot make any changes to what was submitted by Person1.

    I want to have a 2nd people picker that autofills with the data for Approver1 according to the action rule:
    Condition: /my:myFields/my:Approval/my:Approver1/pc:Person/pc:AccountId is blank,
    Run these actions: Set a field's value: /my:myFields/my:Approval/my:Approver1/pc:Person/pc:AccountId = useName()

    However, the Approver1 people picker fills with the same data as the Person1 people picker. I have attempted to disable Approver1 while ReadyForReview ≠ TRUE. It still fills with Person1 data. I have attempted to to set AccountID, DisplayName, and AccountType for Approver1 = "" whenever the value of ReadyForReview changes. It still fills with Person1 data.

    Thank you in advance. Any assistance is appreciated.
  • 10-01-2020 07:51 AM In reply to

    Re: Two Separate People Picker Controls

    Where is the rule running from? OnLoad? I would think if it were an OnLoad rule, and has a condition to only execute if ReadyForReview=TRUE (and Approver1 is the only person who will open & submit the form once ready for review is true) that this would work as anticipated. It looks like you might be setting it when Ready for Review changes tho - so at that point, the userName would still be the submitter, right? I'm the submitter, I click submit - as part of the submit rules, ready for review is set to true, ready for review will set the approver to the current user name, which is still me, because I have the form open....
    Hilary Stoupa

  • 10-01-2020 12:37 PM In reply to

    Re: Two Separate People Picker Controls

    Thank you for the advice! I was able to move Submit rules over to Form Load rules. I now have 2 Form Load rules. The first occurs when ReadyForReview = FALSE (default) and the second occurs when ReadyForReview = TRUE. During the Form Load rule for RFR = TRUE I am switching to Approval view, resetting the AccountType, DisplayName, AccountID, setting AccountID = userName(), retrieving email address; in that order respectively. Shifting my focus from button clicking over to form loading was great advice! Thank you.
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.