Expression help
1 1

5 posts in this topic

I need some help with expressions, they honestly have confused me a bit. I've been trying to input an expression on the Shot Status column and have not gotten it figured out. The help doesn't fully explain them to an understandable point for my brain. I'm not programming inept either, I code in Javascript all the time. The syntax is what's throwing me here.

 

Ideally I would like to have a shot count of certain status's at the top of the column, something like...

 

"WIP: 25 / Notes: 10 / Waiting: 14"

 

I tried something like this earlier and was getting 1 and "Passed" for the expression syntax, but not what I am wanting in results.

 

I wrote...

WIP: {func.count(func.IF(self.name, "", "WIP Ready To Send"))}

It returns "WIP: 1".

 

I'm sure I need a loop or something in there to iterate through all items, but again, confused on the syntax. Any help appreciated, thanks.

 

My brain is use to this setup...

var ary = 0;for(var i=0; i<itemsLen; i++){     if(items[i].name == "WIP Ready To Send"){          ary++;     }}return ary;

Share this post


Link to post
Share on other sites

Hi David,

 

Try modifying the expression you have to something like:

WIP: {func.IF(TaskStatus.name == "WIP Ready To Send", 1, 0)}

This expression will count all tasks where the status name is "WIP Ready To Send" as 1 and the rest as 0.

Make sure to select "Sum" as "Summary type" before saving.

 

Let me know if that helps.

 

Regrds,

Carl

Share this post


Link to post
Share on other sites

Ah, sorry I misread your question.

 

Expressions in the spreadsheet header can only operate on tasks at the moment. Expressions using Shots/Asset builds can only be added as Custom attributes as type "expression".

 

This on the other hand sounds like something we want to do and I'll add it as a feature request.

 

Regards,

Carl

Share this post


Link to post
Share on other sites

Ah, sorry I misread your question.

 

Expressions in the spreadsheet header can only operate on tasks at the moment. Expressions using Shots/Asset builds can only be added as Custom attributes as type "expression".

 

This on the other hand sounds like something we want to do and I'll add it as a feature request.

 

Regards,

Carl

Ah, ok. Bummer. Yes, please add this feature. Accessing shots is just as important as the individual shot tasks. What I do now is have various filter views that house certain status types so I can see a total for each category. I was just looking to have that data right there in the column for fast reference. Switching views is just too time consuming when all I just need is a quick count of my WIPs or Have Notes shots, etc... very similar to the Dashboard view, but up front so I don't have to switch the view.

 

Also related, could you also consider pushing the number column down by one or at the very least starting the numbers at 0? When I look at any list and view the last item to see how many are listed, I always have to mentally remember to subtract 1 from it. I get that it's spreadsheet logic, and it's not the end of the world, but it is very annoying. Thanks. :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
1 1