locked
Set field to create approval workflow RRS feed

  • Question

  • Hello,

    I am creating a form with InfoPath, and would like to go under an approval Workflow in SPD.
    I got a problem, how can the approval workflow route the request to the correct approver who is based on a selected choice from a drop-down field in Infopath?
    For example, the drop-down meunu contains many departments, and each department got its own Dept. head. When the users select one department (e.g. Finance) from the choices, i would like the workflow to route the form to the Finance department head for approval. How do I achieve this? How can i set the value to the field?

    Thanks!

    Wednesday, July 6, 2011 8:19 AM

Answers

  • Hello,

    Where are you pulling the department from (I assume this is an external connection populating the dropdown choices, correct?).  In your dataconnection that pulls departments it should also be pulling the DeptHead field as well.  You should have another field in your form's datasource for the department head.  Put a rull on the department dropdown of "set a field's value".  For the field to set, select the DeptHead field in your form's datasource (the main datasource).  For the value seleclt "insert field or group".  Change the datasource in the top dropdown to the datasource you are using to pull in the departments.  Select the DeptHead field, click "filter" and then set the filter as where "Department (the field bound to the dropdown in the main datasource) is equal to Department (the department field from your secondary datasource where you pull the department information).

    Now, when you go to publish your form, in the property promotion step of the wizard add the DeptHead field.  This field is now usable in your workflow.  For the To line in the SPD workflow, click the address book, then select the workflow lookup option.  In the first dropdown keep it as "Current Item", in the bottom dropdown select the DeptHead field your promoted from your form.

    • Marked as answer by Xiao Gui Monday, July 11, 2011 8:18 AM
    Wednesday, July 6, 2011 12:30 PM

All replies

  • Hello,

    Where are you pulling the department from (I assume this is an external connection populating the dropdown choices, correct?).  In your dataconnection that pulls departments it should also be pulling the DeptHead field as well.  You should have another field in your form's datasource for the department head.  Put a rull on the department dropdown of "set a field's value".  For the field to set, select the DeptHead field in your form's datasource (the main datasource).  For the value seleclt "insert field or group".  Change the datasource in the top dropdown to the datasource you are using to pull in the departments.  Select the DeptHead field, click "filter" and then set the filter as where "Department (the field bound to the dropdown in the main datasource) is equal to Department (the department field from your secondary datasource where you pull the department information).

    Now, when you go to publish your form, in the property promotion step of the wizard add the DeptHead field.  This field is now usable in your workflow.  For the To line in the SPD workflow, click the address book, then select the workflow lookup option.  In the first dropdown keep it as "Current Item", in the bottom dropdown select the DeptHead field your promoted from your form.

    • Marked as answer by Xiao Gui Monday, July 11, 2011 8:18 AM
    Wednesday, July 6, 2011 12:30 PM
  • Thanks for your detail explanation!
    Monday, July 11, 2011 8:19 AM