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

Unable to use lookup properly on data table in powerapps to fetch value from different tables

I am try to building an app which uses different data tables from SQL server to fetch data. Data tables from SQL server includes, EmployeeLeaveHistory, Employee, Status, LeaveType, etc.

In one of the screens, I am using a data table which gets data from one of the SQL Table (EmployeeLeaveHistory) with column names as employeeID, LeaveID, StatusID, LeaveTypeID. As a part of better user experience, I want the records to show as respective values from respective tables. For example, Paid Leave, Casual Leave, Medical Leave instead of showing 1, 2, 3, etc as columns fills.

I tried using lookup but it fills all the IDs with same value (first value from data table) irrespective of what is the ID. I am attaching the screenshots below. It would be a great help if anyone can guide on how to do it properly where IDs show their respective values only.

3 REPLIES 3
rohsh354
Community Support
Community Support

Hello,

 

You can create SQL views joining data tables and show the column names as per your requirements. Then call the same SQL view in powerapps. More details are available on below link:

 

https://powerapps.microsoft.com/en-us/blog/using-sql-server-views-in-powerapps/

 

 

Thanks @rohsh354 .. It worked really well.

I created a separate view with all the required changes and added it as a data source.

Only add-on in the process is, it has to be fed data in dynamically to fetch respective details, which can be done using filter, lookup or any of those conditional property.

 

Update: 

After adding view as a data table in one of the screen, I am trying to pass the argument of given row to another screen which has edit form to review the row entries and action button of approve or reject. But for some reasons, the arguments are not being forwarded by 'view' table, whereas it works for normal table.

 

Is there a way to resolve this issue?

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,890)