I have been trying everything to fix below problom. Unfortunately i could not fix it.
I have 2 tabels from different database one called Employee and the other one is sickness table.
So what i want is that as you can see in below picture. I want to see in 1 screen the data of my employee and also the data of my sickness table. When I play the screen then i can only see the employee data and not the sickness data. I tried many time the lookup functions as you can see, but it doesn`t work.
Could you please me out here?
LookUp('[DSL].[MDS_EMPLOYEE_SICKNESS]';EmployeeId=EmployeeNr;Sickness_End) this what i use
Solved! Go to Solution.
Thank you for your trouble!
I will show you how i finally fixed it. you will find the solution in the attachment. As you can see the Name box is Joined through Lookup function.
But I have 2 more issues now. As you can see in the second printscreen. I have a list of my employees. When I click on the icon to see more details. Then I dont get the same data of this employee in this case Ali. So in the overview screen you can see Name Ali and EmployeeID 1000501~~. and in the Detail overview screen I see on EmployeeID this: AJ~~Athena IT-Group A/S. This is different ID. So how can i fix this?
And one more importent thing i want to display on my Details screen is the total hours sickness of the employee ( Ali in this case). I will explain you better when a employee is sick then in the source database 1 row will be created in this case was Ali 2 times sick so to rows. So how can i calculate this so that i see 14 hours?
Code EmployeeId Hours Reason
3017 1000501~~Sentia MPC B.V. 7.00 Ziek
3025 1000501~~Sentia MPC B.V. 7.00 Ziek
Thank you so much for helping me!
Do both tables have a common field eg Employee id ?
If so then you should be able to get the first table, then get the Employee id and use that using LookUp(2ndtable, Employeeid = 2ndtable.employeeid) to get the second table and then the record itself.
I see on your screen shot, you have two red circles. These point to errors in your formulae. The Screen will not populate whilst there are errors have noit been fixed.
In table employee i have employeeID and employeeNR. In table sickness i have employeeID. employeeNR = employeeID.
Which forumla do i have to use? This one LookUp('[DSL].[MDS_EMPLOYEE_SICKNESS]';EmployeeId='[ISL].[Employee]';Employeenr) ?
I am not too familiar with PowerApps and SQL Server, but are you sure you need a ";'" before EmployeeId.
Should it not be a ',' ?
Certainly, if you were using SharePoint Lists the format would be Set(SicknessRecordnr,LookUp(MDS_EMPLOEE_SICKNESS, EmployeeId='[ISL].[Employee]',Employeenr))
which gets the Sickness Record number in the global variable SicknessRecordnr.
To get the record itself :-
Hi @NigelP & @Anonymous (thank you for your explaining)
Thanks for your response! What I want is this: Below you see 2 table in 1 screen the blue one is the data like name, birthname etc. of the employee. And the second table the green one is the data of the employee about the sickness.
What I want to do is when i play the screen i want to be able to modify the green table. The blue one must only display the data.
Unfornately when i play the screen I only the see the blue table data. What do I need to do to fix this?
As you can see in the printscreen i edited both of the table one edit form and the other one view form. Otherwise you can`t see this in the edit mode screen. But the problem is when I play the screen then I see this: only the employee data.
On the Blue screen, what is the Item that is supposed to be shown ?
Pick an field and try Set(gTestvalue, ThisItem. <whatever field you are trying to view> ) withing the Form.
Then see if there is a value in gTestValue. If there is not, then it is your SQL Statment, otherwise check the visibilty property of the form and the field.
Thank you for your response! As you saw in my previous picture you could only see the blue part when I play the screen (F5).
As you can see I just tried your syntax. Unfortunately it does not work again.
Further everything looks okay to me. But i think it might be that PowerApps can not view 2 different databases on 1 screen?
Check it out!
Check it out!
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
The largest Power BI, Power Platform, and Data conference in New Zealand