Database View with calculated value columns

Hyma Oruganti
Kilo Contributor

Hi All, 

I did inner join 2 tables and created a database view. Table A has a calculated description field whose values are displayed in table A list view. But in the DB view that column is not populating any values. Is this expected behavior with DB views. Do DBViews not show calculated value columns?

Also even If I select few fields from each of the tables' View fields section it is showing all columns including SysIds. How can I not show sysids and other unwanted columns. 

Thanks in advance

Hyma

 

1 ACCEPTED SOLUTION

Erik Gunther2
Kilo Guru

If you don't specify fields, the database view will return all fields. 

https://docs.servicenow.com/bundle/orlando-platform-administration/page/use/reporting/concept/c_Spec...

 

It appears others have had issues with calculated fields in database views. I don't think they are supported but you could setup a business rule or ensure that the value is calculated and updates the field value.

https://community.servicenow.com/community?id=community_question&sys_id=3a648b69dbd8dbc01dcaf3231f96...

 

View solution in original post

4 REPLIES 4

Erik Gunther2
Kilo Guru

If you don't specify fields, the database view will return all fields. 

https://docs.servicenow.com/bundle/orlando-platform-administration/page/use/reporting/concept/c_Spec...

 

It appears others have had issues with calculated fields in database views. I don't think they are supported but you could setup a business rule or ensure that the value is calculated and updates the field value.

https://community.servicenow.com/community?id=community_question&sys_id=3a648b69dbd8dbc01dcaf3231f96...

 

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

As said if you don't specify any view fields for view tables it shows all fields from both the table

For calculated field; please check below links

https://community.servicenow.com/community?id=community_question&sys_id=b3430325dbd8dbc01dcaf3231f96...

https://community.servicenow.com/community?id=community_question&sys_id=b9aa0119dbd5bb0cfeb1a851ca96...

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

Ct111
Tera Sage

You need  to specify the fields if you want to return certain fields else it will bring all the data from both the tables.

Check the below link for the same

https://docs.servicenow.com/bundle/orlando-platform-administration/page/use/reporting/concept/c_Spec...

 

Mark my ANSWER as CORRECT and HELPFUL if it helps....

 

There is also a very good video made by chuck on views so please watch it as well.

https://community.servicenow.com/community?id=community_blog&sys_id=34bc6a25dbd0dbc01dcaf3231f96197d

Ankur Bawiskar
Tera Patron
Tera Patron

@Hyma Oruganti 

Is this question resolved or you need some more assistance.

if my answer helped you, kindly mark it as Correct & 👍Helpful so that it does not appear in unanswered list & close the thread.

Regards
Ankur

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