Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

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

Avatar

Level 5

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

 

1 Accepted Solution

Avatar

Correct answer by
Level 5

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! 

View solution in original post

4 Replies

Avatar

Level 2
{numberOfOpenRequests}

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

{DE:numberOfOpenRequests}

Avatar

Level 5

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 

Avatar

Correct answer by
Level 5

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! 

Avatar

Community Advisor

for number of open requests, I'd try {numberOfOpenIssues}, since requests and issues are essentially the same thing, just differentiated by how they were created.