Add approval comments to form


Badge +1

Hi

 

I'm using Nintex Workflow, SharePoint 2010 and InfoPath 2013.

 

I have a form created in InfoPath that places submissions in a library. The workflow has a section that requests an approval from a dean. If the dean rejects it, I'd like to populate a text box on the form with the dean's comments.

 

I added a text box (called deanRejection) to the form, included that field as a column and published it. In the workflow, I can see how to set a variable to equal Approver Comments. I tried "Set field value" but the only choices are Content Type, Name, Title.

 

I can't figure out how to populate that deanRejection text box with the comments.

 

Is this possible? If so, how can I do it?

 

Thanks,

 

Sonya


3 replies

Badge +3

Hi Sonya,

Seems like you have the right idea.

Request Approval

Set Variable (RejectionComments to Workflow Contex/Approver Comments)

Set Field Value (DeanRejection to RejectionComments)

You may need to add a commit pending changes in between the set variable and set field value for it to work this way. Other option is to Edit the Task Form and set the comments to the variable that way.

Badge +1

Thanks for the reply.

Since the deanRejection text field I chose when publishing the form didn't appear in the drop-down list of options in the Set Field Value box, I added a column to the library via SharePoint Designer (clicked the library tab > Edit Library > Edit List Columns > Add New Column > Lookup > Chose the library > Chose the Dean Rejection field > Clicked OK then saved). I named that column DeanRejectionComments. That now appears as an option in the Set Field Value drop-down list.

So the workflow goes:

  1. Request Approval
  2. Set Variable (DeanRejectionVariable, Equals Workflow Context, Approver Comments)
  3. Commit pending changes
  4. Set Field Value (DeanRejectionComments, Equals Workflow Data, DeanRejectionVariable)

When that's run, it errors out with this:

Coercion Failed: Unable to transform the input lookup data into the requested type.

I'm guessing there's a problem with the DeanRejectionComments column?

Thanks for the help,

Sonya

Badge +1

I forgot to update this thread, but I contacted Nintex who helped me figure this out awhile back.

 

If I recall, I needed to re-create the text box that would hold the comments. Then I went to File > Publish > SharePoint Server > Click Next past the location > Made sure Site Content Type was checked and clicked Next > Clicked Next past the template location > Clicked Add to add a field to promote as a column > Chose the newly created textbox field and checked the "Allow users to edit data in this field by using a datasheet or properties page" and clicked OK > Clicked Next > Clicked Publish.

 

The interesting thing, was we had to recreate the textbox in order for that "Allow users to edit data..." option to work. In other words, if the textbox had already been created, then checking that box after the fact had no effect. A new textbox had to be created and the first time it was promoted as a column, the "Allow users to edit data..." box had to be checked.

Reply