Stumped by repeating data... :( - InfoPath Dev
in

InfoPath Dev

Stumped by repeating data... :(

Last post 08-26-2011 10:42 AM by Hilary Stoupa. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 08-26-2011 09:01 AM

    Stumped by repeating data... :(

    Good morning,

    I'm working on two step content approval form in InfoPath, and I'm completely stumped. :(  What I want to do isn't that complex, but I cannot for the life of me figure it out.

    A form initiator fills out this form and submits it.  The first approval is static, it's always handled by the same person. (I'll call her the operator)  However, after she approves the request, she has to forward it to another department manager for final approval.  This part is dynamic.  Some departments have multiple managers that can approve this type of request.  I call 2nd approval role "Manager approval"

    My idea is to have the operator fill out a repeating table (called email addresses) with the email addresses of everyone that can approve this request.  Sometimes it'll only be 1 email address, other times it can be 4 or 5.   How do I pass the data she enters into another repeating group?  My plan is to take the email addresses she's entered, parse it into another repeating group (Manager_Roles) that is assigned to a user role in the form.  Members of this user_role group will be the only ones that can give the 2nd (and final) approval.

    I hope I explained myself well enough!  Is there an easier way to do this than what I'm trying?  I don't know of a better way to assign user roles when the second approval process can be handled by a dynamic group.

  • 08-26-2011 09:07 AM In reply to

    Re: Stumped by repeating data... :(

    Hi - can you help me understand why the data needs to be copied into another repeating group? Can't you just use the field she is typing the addresses into for the user role?

    Hilary Stoupa

  • 08-26-2011 10:02 AM In reply to

    Re: Stumped by repeating data... :(

    Hello Hilary,

    "can you help me understand why the data needs to be copied into another repeating group" - IT might not have to, it's the only way I can imagine doing it.  I need to get 2 sets of data from the "operator".  I need the email addresses of the people that need to be notified, and I need those converted into domain credentials.     OUr domain credentials follow the naming convention "Domain\Firstname.Lastname" and our email addresses are [email protected] 

    Previously the operator only entered in one email address for the manager approval.  The requirement has sense changed and they want the ability for more than one person to be able to give approval.

    How I made it work before was I had a rule set to fire after the operator entered the email address that would set my "Manager_Role" as, "concat("Domain\", substring-before(Email_Address, "@")).    My idea was to duplicate this functionality by replacing the single fields with repeating groups.

    "Can't you just use the field she is typing the addresses into for the user role?" - I guess this could work, it would just be "ugly" on the end-user side.  Having the end user have to enter the email address and then type in the domain username seems like a cumbersome set of steps.

    Thank you for your quick response!  I know you've helped me with some form issues in the past, thank you for your time.

     

  • 08-26-2011 10:17 AM In reply to

    Re: Stumped by repeating data... :(

    So, you'd have a repeating group that has two fields - email and manager_role. The table on the form only shows the email field - you don't have to display the manager_role field. The email field has a rule on it to set the manager_role field. I certainly wouldn't suggest having the user enter info she doesn't have to. :-}

    I think though - you may have existing XML and that's the issue you are having? You maybe made the email field a repeating field instead of putting it in a repeating group? Then made the manager_role field a repeating field as well?

    Just so you know, out of the box, InfoPath has no rule actions that will allow you to add an instance of a repeating field or group, which is what I think you are saying you want to do. You'd need to write code or use an add-on like qRules for that.

    Hilary Stoupa

  • 08-26-2011 10:25 AM In reply to

    Re: Stumped by repeating data... :(

    "InfoPath has no rule actions that will allow you to add an instance of a repeating field or group" - This is what I was trying to do... but you helped me see the light.

    I don't need 2 sets of repeating data, I'm such a fool! Creating one repeating group with 2 fields, one named "email address" and the other "Manager_Role".  Using my old rule works to set the field value of "Manager_Role" works, I just had the setup wrong.

    Thanks for your help Hilary and Happy friday!

  • 08-26-2011 10:42 AM In reply to

    Re: Stumped by repeating data... :(

    Happy Friday to you!

    Again - if you already have been using this form, be careful with data source changes! You don't want to delete data from your old XML with your new template.....

    Hilary Stoupa

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