cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DynamicsHS
Resolver I
Resolver I

Lookup not working for dataverse

Hello, 

 

I have two tables in dataverse (dynamics HR), one is called leave requests and the other is called leave request details. I will be uploading the data from the leave request table into a gallery in power apps, but I need to get the 'leave request date column' as part of that gallery which is from leave request detail table. I have created the relationship between the two tables, Many to one (leave request - leave request details). I have also made sure that both tables have a relationships with the worker table so that I can pull the workers full name. 

When I do a lookup for the workers full name in the worker table - I am able to get the workers full name details which is good.

see below:

DynamicsHS_0-1651645392071.png

 

But when I try to do the same thing and look up the leave request date in the leave request details table nothing shows up? There are two leave request detail drop downs available the leave request date details is the relationship I created and nothing shows up? 

DynamicsHS_1-1651645392127.png

 

 

while the other one just comes up with an error:

DynamicsHS_2-1651645392089.png

 

 

Can someone please help me in the right direction. Have I done something wrong in the back end? 

 

Thanks,

HS

12 REPLIES 12
Robin1988
Helper IV
Helper IV

Hello,

 

Have you tried extending the code by one more dot. Then you will get more suggestions from the data source. Layer deeper.

Something like this..

ThisItem.'Worker (cdm_WorkerId)'.LeaveDate.Fullname

 

Hi Robin, 

This didnt work.

DynamicsHS_0-1651646169369.png

 

I tried this as well and it also did not work:

DynamicsHS_1-1651646216480.png

 

 

Robin1988
Helper IV
Helper IV

In the Workers table(the table linked to the Gallery) in dataverse you have a Lookup column use that name after ThisItem. and then the name of column you are looking for:)

ThisItem.LOOKupFieldname.Firstname

 

Hi Robin, 

 

Yes that works for the worker table see below:

DynamicsHS_0-1651646901087.png

But I also need to retrieve the leave date from the leave request details table. I apply the same method but nothing comes ups? 

DynamicsHS_1-1651646983213.png

Thanks. 

Is there anything else I can try?

Robin1988
Helper IV
Helper IV

Can you screenshot the lookup field names in Worker table?

Hi Robin:

 See below: 

DynamicsHS_0-1651650071252.png

 

DynamicsHS_1-1651650092949.png

 

This is the column table in the worker table: - there seems to be no lookup columns for the 2 leave request tables even though I have created relationships for them.

DynamicsHS_2-1651650154374.png

 

If I go into the leave request table and click 'view' - active: 

I am able to get the workers full name from the related worker table. But when I go into the leave request detail table (which I created the relationship). When I put leave date in nothing comes up. 

DynamicsHS_4-1651650769084.png

 

Alternatively, If I was to open up my leave request detail table. I can get the status of the leave request from the leave request table (blue) but I cannot get the full name from the worker table (red):

 

DynamicsHS_3-1651650625393.png

 

 

 

Robin1988
Helper IV
Helper IV

I tought It was only showing the related data inside the gallery. But it looks like the relation is there, but current data is not realy related yet. So dataverse don't know what to display. Do you have a form(with related fields)? Then adding a new item (fill in the fields) then add, then you see related data?

 

Go in Dataverse to tables, data, add new record..

Hi Robin, 

 

I'm a little bit confused. I created a form and as soon as I started putting in fields from the leave request table red cross's started to appear:

DynamicsHS_0-1651657690791.png

 

Robin1988
Helper IV
Helper IV

Hi 🙂

 

I mean up here in Dataverse 1. then 2. and if the form does not have all the fields then first edit the main form in tab 'form'.

Robin1988_0-1651663438840.png

 



Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,728)