cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rmarin
New Member

Failure in assigning correct users in Planner tasks when there are also incorrect ones

Hello there,

I'm building my first ever Flow. Trying to create tasks in a Planner with MS Forms.
I have one of those Forms, which has a string field used to manually type corporate email addresses (because Forms doesn't support AD search) to "Assign" them to the task in Planner. X number of email addresses are possible.

rmarin_0-1617743948538.png


It can be the case (more often than not) that people type those incorrectly. In the picture above let's assume my domain is conToso.com, and yet user3 is conSoso.com. The problem comes evidently with "Assign to" in Planner via the Flow, because conSoso is not in the AD, so it can't add that user.

Using the Planner Action "Add user to task" returns this:

 

 

 "message": "Referenced User or Group (USER3@CONSOSO.COM) is not found.",

 

 

At this point, this is perfectly acceptable and the workflow finishes successfully because I have a "Run after -- failure/skip". Ticket is created, most other details populated as designed.

 

However, the problem for me is that the other 2 email addresses in that text field were correct (user1 and user2@conToso.com), but Flow didn't "Assign" those correct users to the task: either all are correct and then all are assigned to the ticket, or a single typo in one of them and it doesn't assign anything to anyone.

rmarin_1-1617745673930.png

 

In summary, I want the "found" users added, and the "not found" ones just skipped. It shouldn't drop them all if one is incorrect. Right now it is a complete hassle because we need to go back to the task to add ALL the users again if one of the addresses had a little typo in the Form... so why are we using it at all?


I've tried a few things (split ';' separated and assign to an initialized matrix variable with some "Apply to each" later trying to update the field one by one recursively based on that matrix and "ignoring" the failures... also some IF() to check if the array has "valid" values etc... and some other options).

I'm sure i've been close to make it work, but my lack of experience using Flow doesn't let me fully understand what I am missing and I scrap all that logic and start with something new.

 

Any detailed ideas that you may think of will be highly appreciated.
Thank you very much in advance for your replies.

2 REPLIES 2
chasestreetdev
Advocate I
Advocate I

Can you share the flow where you used the ; split? Seems like that should work, maybe just needs some troubleshooting.

rmarin
New Member

Actually, I managed to fix it today. I was not properly initializing the Array variable. I was trying to assing it the value ** split(string,';') ** (assumed it would spit out an array itself)... but the solution was to add array() at the higher level ** array(split(sprint,';')) ** and assign that.

rmarin_1-1617807218501.png

 

Now the incorrect ones are skipped and the correct ones added in the Planner Task (with "Apply to each" --> "Add user to task" later in the stream).

Thank you.

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (74,700)