PeoplePicker collection - Coercion Failed: Unable to transform the input lookup data into the requested type

  • 27 August 2018
  • 3 replies
  • 11 views

Badge +5

Hi,

I have a list named Personnel which has a people picker filed that can be multiple person. 

218875_pastedImage_1.png

There is a second list named MTarget, Dept and Position are lookup fileds to the Personnel list

218903_pastedImage_2.png

218904_pastedImage_3.png

I have a workflow on MTarget, this workflow runs on item creation and has to create an item per person in a third list.

the workflow does a query list to Personnel, filters based on Dept and Position, returns Personnel, then I put this personnel in a Multipleline of text, split with ";" and set the result to a collection variable:

 

218905_pastedImage_4.png

But I got this on running workflow:

218906_pastedImage_5.png

this is the foreach action:

218907_pastedImage_6.png

I used both string and peoplepicker type for varPerson and got the same error!

Ant thoughts would be appreciated!


3 replies

Userlevel 5
Badge +14

can you post configurations of single actions?

have you checked what exactly you get returned from query list action and what's exact varPersonel value being input to create item action? - write them to log

Badge +5

Thanks Marian,

here is the query list:

218919_pastedImage_1.png

varMLPersonnel its a multiple line variable. 

this is regular expression:

218920_pastedImage_2.png

this is what varMLPersonnel returns for me (users' LAN ID)

i:0#.w|tppykap;i:0#.w|tp mdavid;

workflow history:

218939_pastedImage_3.png

Userlevel 5
Badge +14

I suspect semicolon at the end of user list is causing problem - it causes last collection element is empty and cannot be converted to a valid user

try to split user list by following regular expression

;(?!$)

Reply