Text mode to subtract two columns in a view, ability to add in color coding?? | Community
Skip to main content
Level 4
November 22, 2022
Solved

Text mode to subtract two columns in a view, ability to add in color coding??

  • November 22, 2022
  • 1 reply
  • 1255 views

I am trying to subtract two columns in a view but not getting the result expected: 

 

displayname=Remaining Seats Available
textmode=true
valueexpression=SUB({DE:CO - Available Seats},{numberOfOpenRequests})

valueformat=HTML

 

This calc is only bringing in the "CO - Available Seats" data point (so, say my CO - Available Seats field is 6, I have 3 open requests on the task - the calculated field should be showing me I have 3 remaining seats available, but it is showing 6). Do I need to specify what object "numberOfOpenRequests" relates to in the calculation? I tried adding in {task:numberOfOpenRequests} but that is still not working. 

 

On another level, once that calc works, am I able to color code the calculated field (say, if the number is negative meaning I have more open requests than available seats, the field would be red)? 

 

Thank you for your help,

Olivia

 

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 OliviaMi

Actually, I figured it out - 101 Lesson for me over here!! I was pulling in {numberOfOpenRequests} which looked like the field name, but when I went into that field and clicked Switch to text mode, I saw the namekey of that field was numberOpenOpTasks... when I used that I started getting the right calculation! 

1 reply

Rafal_Bainie
Community Advisor
Community Advisor
November 23, 2022
{numberOfOpenRequests}

doesn't look like default field so I would try:

{DE:numberOfOpenRequests}
OliviaMiAuthor
Level 4
November 23, 2022

Thanks Rafal! I tried that as well, but I believe it is a system field. When I look at my custom fields, that one does not exist on the list. When I search for "number of open requests", it shows up with the following objects: Task, Project, Parent, Rejection Request... I want to pull in the Task field of Number of Open Requests, so wondering is there a way to specify I want that specific field? Thank you - Olivia