function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Leah MorganLeah Morgan 

Create custom formula on report

I am attempting to create a custom formula on a report that will return either a '1' or a '2' depending on the status of a picklist.  I've never done this before, so I'm not sure how it would be done.  The goal is to then be able to use conditional formating on the chart depending on the value returned.

This is what I have so far:
IF(ISPICKVAL(SVMXC__Service_Group_Members__c.SM_PS_Technician_Status__c, 'Available'), 1,2)

However I am getting the error stating "Error: Invalid custom summary formula definition: Incorrect parameter type for function 'ISPICKVAL()'. Expected Picklist, received Object."

When I take the Object off of the field and run this formula:
 
IF(ISPICKVAL(SM_PS_Technician_Status__c, 'Available'), 1,2)

I get this error: "Error: Invalid custom summary formula definition: Field SM_PS_Technician_Status__c does not exist. Check spelling."

Does anyone have any idea of what I might be doing wrong?

Thank you!
 
rmittal85rmittal85
Hi Leah,
You cannot reference functions like ISPICKVAL in the custom summary formula fields, you will need to create a formula field on the Object then use that field in your report either to summarize it or use it in a custom summary formula field. Hope this helps.

Regards
Richa
Leah MorganLeah Morgan
Thank you,

Do you know if there is any other way to put conditional highlighting on a report that uses text values instead of numbers?

This is my report, I would like to be able to mark available in green and not available in red to give it a more graphic appeal:

Table Dashboard
Leah MorganLeah Morgan
As a follow up I created a custom field that either displays 1 if the tech is available, or else 2.  However, the report is still not allowing me to do conditional markup based on this new field, it only lets me do it on record count.

I don't even need the record count field.  is there a way that I can get rid of this and just do conditional formatting off of my new numeric field?

Here is what my new report looks like: 
User-added image

Here is my original report.
User-added image