Skip to main content

Hello, 

We are trying to create a View with columns from three different tables. 

Created a view with whatever columns we needed:

Following code has been written as Views code group template.

select     ed.first_name                 as employee_name
         , ed.employee_detail_id     as employee_id
         , jd.manager_id             as manager_id
         , ts.project_id             as project_id
         , ts.project_activity_id    as project_activity
         , ts.iso_week_number        as week_number
         , ts.monday                 as monday
         , ts.tuesday                as tuesday
         ,ts.wednesday               as wednesday
         ,ts.thursday                as thursday
         ,ts.friday                  as friday
 from employee_detail ed  
 join time_sheet ts
      on ts.employee_detail_id = ed.employee_detail_id
 join job_detail jd 
      on jd.employee_detail_id=ed.employee_detail_id

 

 

But it shows following error while executing. 

Error message while executing view code group template

Tried as per the source available in  documentation. Why do i get this error, could someone help me out here?

Thank you

Hi Usha,

Have you tried to regenerate the code group and then generate and execute the code again? This should do the trick. As explained here: 

 

Also, make sure the order of the data model columns are the same as you have specified in your View code. It looks like your first data model column is "employee_detail_id" while your code column is "employee_name".


Thanks Mark!

It works after changing the order of columns and regenerating the code group.