Note that there are some explanatory texts on larger screens.

plurals
  1. POSharePoint Workflow Error: "Unable to transform the input lookup data into the requested type" BUT only on New Item Creation
    text
    copied!<p>FYI to start, I am aware of how to properly set up an update to a lookup, and am 99% positive I've done this correctly. </p> <p>I know this because When I set the workflow to automatically start when an Item is Changed, then it works perfectly. But when I simply change this setting so it will automatically start on New Item Creation, it Cancels the workflow and I get a "Coercion Failed: Unable to transform the input lookup data into the requested type." If both options are checked then it fails on creation, but simply clicking edit on the item properties, and the "Save" makes it work.</p> <p>The workflow is on a Document Library and works as follows;</p> <p>User selects the Work Task LookUp from a dropdown in the edit properties form after uploading, and then Saves the item (adding it to the document library). The workflow is suppose to then look at the Work Task LookUp selected, and pull the Account and Effective Date-Type lookUp ID's that Work Task item has, and sets the Document's identical fields to the same value.</p> <p>Here is the code for the workflow if it helps;</p> <pre><code>If Current Item: Parent Task is not empty If Current Item: Sub Task is not empty Log Both are empty to workflow history list Then Set Account to Work Tasks:Account The Log Set Account to workflow history list Then Set Effective Date and Type to WorkTasks: Effective Date and Type The Log Set EffDateType to the workflow history list </code></pre> <p>This is all done in one step. I also added additional steps to test if the account and effective date type fields have been set properly, and if not to set them again. But everytime I run the workflow on change and it works, it always correctly sets these fields based upon the first Step (posted above) and the additional check logs to the history that they are not needed.</p> <p>As an example, The lookUp for Integer for Tasks:Account is set to work as follows;</p> <pre><code>Date Source: Work Tasks (a list) Field from Source: Account (a lookup) Return Field as: Lookup ID (as Integer) Find the List Item Field: Title (from the Work Tasks list) Value: Current Item: Parent Task (Which is a look up of the "Title" Field from Work Tasks List, and is set to return the Value as a LookUp Value (As Text)) </code></pre> <p>The Effective Date and Type setting is pretty much identical.</p> <p>So anyone have any insight? I've tried running it as an impersonated Step, setting a workflow pause (for 1 minute), changing the lookup types incase I messed it up to start with, but ultimately the above workflow DOES work, but only when I set it to "<strong>Automatically start on the Change (edit) of an Item</strong>", NOT "<strong>Automatically start on New Item Creation</strong>" like I need to to do.</p> <p>Oh yes, fyi, I am using SPServices CascadingDropDown on the Work Task and Sub Task fields of the doc Library form, but I honestly do not believe this has anything to do with my issue.</p> <p><strong>UPDATE:</strong></p> <p>I've talked with another developer, and he believes it is due to the issue that the workflow is occuring too quickly, before the item creates an ID for itself, which it needs to conduct the lookUps. He had me add another "Pause Workflow" to the very top of my workflow code (above the If conditions) and set it for 1 minute.</p> <p>It then worked properly.</p> <p>Downside is we want this to labeling to occur as close to item creation as possible. Because a view of the library relies on grouping based upon Account and Effective Date and Type. To add to this downer, Microsoft's Pause Workflow only allows for 1 minute or more, and then the timer used for this is often off, resulting in a pause longer than that. So far, every test is currently showing 2 minutes minimum on the pause.</p> <p>A possible alternative solution for instantaniously populate the fileds is to use Javascript and SPServices to do the lookUp to the Task list to pull the account and effective date - type fields and then populate, but my Javascript is not very strong and I would need help doing this. If anyone has any suggestions, I would appreciate them.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload