cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Regular Visitor

Are we able to lookup a dynamic value from 2 Contact records?

Hi everyone!

 

In dynamics 365 I have a form that records new volunteer leaders for our organization. Two of the fields are lookups to the Contact records, one for the new leader and one for the person they report to.

 

My goal is to use Flow to copy the values of the submitted form into a Sharepoint List for further automation.

 

My original problem was that it was showing the guid for the contact instead of the name of the contact, and I found the solution to that was to use Get Record first, then use FullName so it shows up correctly in Sharepoint.

 

My new problem is I don't know how I can get the full name of both the new leader AND who they report to since they are two separate contact records. Is there a way to get the first record of the new leader, drop that into the sharepoint list item, then get the second Contact's (reports to) name to go into the same record in the Sharepoint list?

 

This gave me a not found error, so I'm assuming it's choking on the 2nd reports to contact lookup being in the same Get Record command?

two contact lookups to sharepoint list.PNG

 

Thanks in advance for any help!

1 ACCEPTED SOLUTION

Accepted Solutions

Almost there!

So, try using the "Search Dynamic Content" window at the top (highlighted below) to look for your "Reports to" ID field.20190429.PNG

 

Another option is to scroll down on your choices until you see the right field.

And to confirm, you want to grab the "Reports To" from the "Get New Leader" record to grab the Boss' contact record, right?

 

Try to make it look like this:20190429a.PNG

 

View solution in original post

9 REPLIES 9
Super User II
Super User II

Hi there @ppmp ,

I think if you do two separate "Get Record" steps, one where you get the leader's name, and then another where you get their boss, then you should be able to use both names in your Create Item step.  Be sure to rename the steps so you can tell them apart more easily...but I think that will do what you want it to.  Let us know if that works, or if there was something I missed.

 

Thanks!

If I do two different Get Record's, how will it know which Full Name I want to use in the sharepoint list? That's where I get stuck 🙂 

Ah, ok.  I understand better now.

When you're adding steps to your Flow, it's very helpful to rename the steps to something more meaningful (in the context of your Flow).

If you click on the ellipses (...) to the right of the name and click "Rename", you can change the name to something like "Find Boss" or "Find Contact".

 

Capture.PNG

 

Then, when you go to create your record, you can more easily find the one from the correct action.  To narrow the number of available options, it's helpful to use the search.  Here, I've searched for "Last" - 

 

Capture.PNG

 

Does that help?

Hi @edgonzales ,

 

Do you want to get the full name of the new leader and the person they report to when a new leader is created?

 

From the screenshot, it seems that you’ve selected two dynamic content for the Item identifier field of Get record.

 

Please add two Get record actions separately for new leader and the person they report to.

 

I have made a simple flow likes below for your reference:

1.PNG

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

This definitely helped, thank you for the tip. I'm still missing something though because I do the two different get record commands but it just returns the same piece of info.

 

I'm looking for the full name of the first contact (employee) and the fullname of the second contact (boss) but it just shows me the employee both times?

 

For the "Item Identifier" on one, use the "Contact" like you have it, but then on the other use "Reports To".

 

This way, on the first one, it will match the user record where the identifier matches contact.

The next "get user" should grab the user record where the identifier matches the "reports to" ID.

 

Still on the right track?

It appears to be giving me different options for the output of the 2nd lookup for some reason. The first time through I'm giving it the Contact field (from my form) and asking it to check against the Contact entity, then I have it return the FullName as output. Notice that my options are all sub-fields from my custom entity:

 

flow1.PNG

 

Then I'm using the Compose action (because someone mentioned it here) to capture the fullname from the Contact entity....

 

But in my second attempt to get the fullname from the 2nd contact lookup in my custom entity (reports to), it no longer allows me to pass in the fields from the custom entity, instead it appears to only allow me to choose contact entity fields instead?

 

flow2.PNG

 

Where I would expect to just tell it to use Reports to and bring back the full name, it doesn't seem to offer the option. By the way I have no idea if I'm using Compose or these Output fields correctly or not 😕

Almost there!

So, try using the "Search Dynamic Content" window at the top (highlighted below) to look for your "Reports to" ID field.20190429.PNG

 

Another option is to scroll down on your choices until you see the right field.

And to confirm, you want to grab the "Reports To" from the "Get New Leader" record to grab the Boss' contact record, right?

 

Try to make it look like this:20190429a.PNG

 

View solution in original post

Ah maybe I was doing something weird earlier but now the option showed up correctly and I think I'm good to go. I really appreciate your help 🙂 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Top Kudoed Authors
Users online (5,639)