The database view that joins the task table and sys_email table is not working as expected.

imran rasheed
Tera Contributor

I created a database view that joins the task table and the sys_email table.

imranrasheed_0-1693396393959.png

But when I try to view, it doesn't show any records. What could be the reason?

13 REPLIES 13

Mohith Devatte
Tera Sage
Tera Sage

Hello @imran rasheed ,

I just tried it in my PDI and it worked well with below configurations.

 

1) Prefix for email table -em

prefix for task table -tsk

 

2) order of task table 100

order of email table 200

 

3)Where clause in email table tsk.sys_id=em.instance or tsk_sys_id=em_instance

 

Try changing the orders and do give prefix with key words like task and email some times this might effect if you give table name as the prefix just like you gave task as the prefix .Cut short the prefix and try .

 

 

Hope this helps 

Mark the answer correct if this helps you 

Thanks

Hello Mohith,

I tried with the prefix which you have mentioned and also updated the orders.

Then when where clause "tsk.sys_id=em.instance" shows no records. With where clause "tsk_sys_id=em_instance" this is error which I got

imranrasheed_0-1693404160432.png

 

 

@imran rasheed under email view table create a view field record for instance field and then try to run it with tsk_sys_id=em_instance" where clause

@Mohith Devatte Now it doesn't show any error. But no records shown yet. The instance field is of document id type. Maybe any changes need to be made based on it?

imranrasheed_0-1693405043167.png

 

@imran rasheed now can you try with tsk.sys_id=em.instance. this clause ? i believe this should work as view field is created and it worked in my PDI too