Database views for pm_project

ashwinipingle
Tera Guru

Hello All,

 

I am using Xanadu patch 7

I am trying to create a database view on pm_project table. If I dont put any where clause, the record count is correct in the view.

I need to select those records where primary_portfolio = 'sys id' (sys_id of the portfolio)

However when I put this condition in where clause, I find that all the records from Task table are also shown (10s of thousands of records). Why does this happen? How to correct this? I tried to use another condition for sys_class_name but even this does not filter out the task records. I need only

 

ashwinipingle_0-1748500901152.png

 

I want to select only those records which have Task type as Project

ashwinipingle_1-1748501022975.png

 

2 REPLIES 2

Jaspal Singh
Mega Patron
Mega Patron

Hi Ashwini,

Replace 'and' with '&&' in the query.

Also, you can apply the query in the report unsure why you need to pass it as a clause as a sys_id of portfolio

@Jaspal Singh  Thanks for your response. I replaced 'and' with '&&' but no improvement. I need to filter the records in database view which I want to expose to powerapps application using REST API.