Accessing an infopath db field value in workflow - InfoPath Dev
in

InfoPath Dev

Accessing an infopath db field value in workflow

Last post 03-17-2010 04:44 PM by warrtalon. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 03-17-2010 06:31 AM

    Accessing an infopath db field value in workflow

    im wanting to implement a fairly simple workflow whereby once a form is submitted an email is sent to 2 recepients that have been selected from dropdown controls. (for them to approve request)

    however within the designer/workflow environment i cant see how i access this information... the dropdowns are fed from a database table that includes the staff member email (though only the name is displayed in the dropdown).. and i cant see how i access any of these db fields within the workflow options...

    i want to find the email address corresponding to the selected staff names in the dropdowns and sent each an email...

    i would then want to run another workflow to another dept when both these recipients confirm approval (checkbox ticked) so would to do a similar thing though these 2 cheeckbox fields would be directly within the form.

    can anyone advise how to do this? 

     

     

     

  • 03-17-2010 04:44 PM In reply to

    Re: Accessing an infopath db field value in workflow

    Should be pretty simple.  You can do one of two things:

    1) In the dropdown controls for those names, you can set the Value to the person's email address while leaving the Display Name as their Full name.  This way, the user selects a friendly name, but the underlying value saved in the XML is that user's email, which you then promote to SharePoint, and it shows up as email address in the form library.  Once the value is in SharePoint, SPD can pick it up and do actions with it, such as using it in the To or CC fields of an email.

    2) If you actually need that Display Name somewhere other than in the InfoPath form itself, then leave both Value and Display Name as the full name of the users, but then create new, hidden fields for storing the email address of the selected user.  What you do is create a rule on the dropdown controls that set's the hidden field's value to the Email Address node of the SQL data connection and filter it where the full name equals the value in the dropdown field.  You're basically saying, "Parse through all users in this data connection, find the one where the name matches, and give me the email address value for that user."  You can do this for however many dropdowns you have as long as you have a separate hidden field for each email address.  Then, promote those email address fields during the re-publish of the form template, and pick up those values in your SPD workflow.

    SPD doesn't need to reda your SQL DB - just expose the SQL data in the form and promote it to SP.

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