Record is not showing when crate a report using 2 table

tarini prasad
Tera Contributor

Hi Team, 

I am facing some issue while creating a report. I have two table i.e. catalog item and user criteria. I want to show item name, catalog, category, available for, not available for in a report. For that I created a database view . But when I fetch the data in report using database view, there is no record in report. for reference I am attaching screenshot.

Please help me to resolve this.

 

Thanks and Regard

Tarini Prasad Muduli

1 ACCEPTED SOLUTION

Ahmmed Ali
Mega Sage

Hello @tarini prasad 

 

You need to add three tables in database view to get both available for and not available for data. Below is working database view in my PDI:

AhmmedAli_0-1690354127302.png

AhmmedAli_1-1690354150899.png

 

Conditions:

 

sc_cat_item  - 100  - cat

sc_cat_item_user_criteria_mtom - 200 - availfor - availfor_sc_cat_item=cat_sys_id

sc_cat_item_user_criteria_no_mtom  - 300 - notavailfor - notavailfor_sc_cat_item=cat_sys_id

 

Thank you,

Ali

 

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali

View solution in original post

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@tarini prasad 

update as this and then check once

sc_cat_item                                                    sct                          100

sc_cat_item_user_criteria_mtom                 mtm                        200                    sct_sys_id=sc_cat_item_sys_id

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur, 

While I tried it showing invalid

WhatsApp Image 2023-07-26 at 12.29.17 PM (1).jpeg

Ahmmed Ali
Mega Sage

Hello @tarini prasad 

 

You need to add three tables in database view to get both available for and not available for data. Below is working database view in my PDI:

AhmmedAli_0-1690354127302.png

AhmmedAli_1-1690354150899.png

 

Conditions:

 

sc_cat_item  - 100  - cat

sc_cat_item_user_criteria_mtom - 200 - availfor - availfor_sc_cat_item=cat_sys_id

sc_cat_item_user_criteria_no_mtom  - 300 - notavailfor - notavailfor_sc_cat_item=cat_sys_id

 

Thank you,

Ali

 

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali