Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Calculated view show in list view

azabielski
Mega Expert

Is there a way i can show a calculated field value in a list view, i've tried through business rules and the calculated value it self and i am not able to see it once switched to the list view only when i view each individual record.

The use case is when we need to bill someone for an over usage of something i need that last value that needs to be billed a calculated value based on the overage amount and the overage price so that multiple records can be seen/selected at once of all the overage prices and execute a custom ui action on all those rows.

1 ACCEPTED SOLUTION

If I am understanding your requirements correctly, the only thing you can do is create a new table that joins the tables together with a pseudo calculated field as shown in my example.



New Table


Field 1: Reference table A


Field 2: Reference table B


Field 3: You field calculated via business logic



Create before update/insert business rule to populate value of field 3.


Dot walk as required to show fields on table A or B in the list.



ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

View solution in original post

10 REPLIES 10

The SN Nerd
Giga Sage
Giga Sage

To fulfill your requirement you would need to create a custom UI page or convert your field to non calculated and move the logic to a business rule.



ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

I tried the business rule way however, i didnt have any scuess at all unless i set the rule to display , but then it doesnt show in the list view and i cant process it to a bill.



Any help in that area would be great.


You have to


  1. Turn 'Calculated Field' off
  2. Copy logic into a before update/insert business rule
  3. Run a once off script on all in flight tickets to populate the field

ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

Right so just for new records the issue is its actually 2 tables that are need to create the value. I did this previously with a tablar function in sql but i need to replicate this in Service Now. So i currently have both tables in a database view.