Updating Entity Reference Power Automate vs Plugin- Owner

In my last blog, I was getting OwnerType as blank. With help of Microsoft community, I understood that we won’t get the OwnerType from the triggering event output. Ideally it should have directly provided, but since it is not provided, let us use the other way around.

Our requirement is to check the Owner type of the Case record and set the same for the task

After the triggering event, I am using “Get a record” step in my flow and the OwnerType value from this step’s output as shown in below snippet

Again here is a tricky thing to remember. If I directly get the OwnerType field from its output in my next step’s expression, again it would be blank. (Not sure why it can’t be used from output in the expression of next step- I may get the reason and some way around and post it)

Hence after getting the record, I need to get that value in a variable as shown in below snippet

Once I have this value in a variable, I can then use it in any expression in next step

if(equals(variables('Ownertype'),'team'),'teams','systemusers')

I thought multiple times if I should use the if else condition which comes in steps Condition, however when I just need to replace the string based on the if condition and rest of the actions are exactly same, then I won’t recommend to use Condition and use branching with same steps. Instead we can use If condition in the expression

Once I use this condition, automatically, it would pick up the OwnerType based on the Case Owner and accordingly assign the same Owner to the Task, be it Team or User, does not matter. For examples, below the owner is Team , hence its setting as Team.

Now another example is a Case where Owner is User.

Task is getting created with same Owner

Lets also check the flow how its executed

In the post we have seen how we can get the Owner from one record and update the same in another record. Let us continue our Power Automate learning in my further posts

Till that time, happy power automating ūüôā Enjoy new learning!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.