Skip to main content
Solved

How to create a view with creation method as Template

  • September 2, 2022
  • 2 replies
  • 99 views

Forum|alt.badge.img+3
  • Warrior
  • 29 replies

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

Best answer by Mark Jongeling

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".

View original
Did this topic help you find an answer to your question?
This topic has been closed for replies.

2 replies

Mark Jongeling
Administrator
Forum|alt.badge.img+23
  • Administrator
  • 3945 replies
  • Answer
  • September 2, 2022

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".


Forum|alt.badge.img+3
  • Author
  • Warrior
  • 29 replies
  • September 3, 2022

Thanks Mark!

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings