I'm having issues getting a custom field to do any calculation in a Report. Is my syntax correct? | Community
Skip to main content
Level 3
May 27, 2023
Solved

I'm having issues getting a custom field to do any calculation in a Report. Is my syntax correct?

  • May 27, 2023
  • 2 replies
  • 895 views

displayname=Days on Hold
linkedname=project
namekey=view.relatedcolumn
namekeyargkey.0=project
namekeyargkey.1=Days Project Has Been On Hold
querysort=DE:project:Days Project Has Been On Hold
textmode=true
valueexpression=DE:project:Days Project Has Been On Hold + 1
valueformat=customDataLabelsAsString

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Richard_Le_

Hi,

 

The following text mode would do it:

 

displayname=Days on Hold
linkedname=project
namekey=view.relatedcolumn
namekeyargkey.0=project
namekeyargkey.1=Days Project Has Been On Hold
querysort=DE:project:Days Project Has Been On Hold
textmode=true
valueexpression=SUM({project}.{DE:Days Project Has Been On Hold},1)
valueformat=customNumberAsString

 

NOTE that the value format is "customNumberAsString" in my code, however in your original code it was customDataLabelsAsString. This suggests that the field has been set up as text format instead of number format. You're likely to find that mathematical expressions will not work with the field set at text.

 

Best Regards,

Rich.

 

2 replies

JMitchell44
Level 2
May 29, 2023

Is your custom field at the same object level as the report you are trying to display it on?

 

Just looking at it I am assuming this is a project-level custom field being pulled on a project-level report, but it doesn't hurt to ask!

Richard_Le_Community AdvisorAccepted solution
Community Advisor
May 30, 2023

Hi,

 

The following text mode would do it:

 

displayname=Days on Hold
linkedname=project
namekey=view.relatedcolumn
namekeyargkey.0=project
namekeyargkey.1=Days Project Has Been On Hold
querysort=DE:project:Days Project Has Been On Hold
textmode=true
valueexpression=SUM({project}.{DE:Days Project Has Been On Hold},1)
valueformat=customNumberAsString

 

NOTE that the value format is "customNumberAsString" in my code, however in your original code it was customDataLabelsAsString. This suggests that the field has been set up as text format instead of number format. You're likely to find that mathematical expressions will not work with the field set at text.

 

Best Regards,

Rich.