Well, that makes no sense at all. If you delete the first condition, does the correct number appear?
No, it still says £0.00 when it should say £81.74.
I’m going to delete all conditions apart from the 30 days one. I want to see if I can get that one to work.
I have found that adding Search for invoices >0
prevents any data from displaying. See below, the first image prevents any data from displaying but the second does display data. Still, the second way won’t show £0.00 when no data to display.
That’s not a bad idea. Didn’t you say it was working before? Maybe get rid of the second part of the condition and see if it works when just setting the custom state to Bttn30.
That does then show the correct number, but won’t show £0.00 when no data to display.
Yes, it is now working and (annoyingly) I can’t see why it didn’t work before. This is the condition setup for the Bttn30. I have added the same condition setup for the other two states (with the correct date range etc to search for).
@mikeloc I think the solution was to search for each item’s GrandTotal count, rather than simply searching for invoices :count. I don’t know why this would be an issue but that is the only thing I think has changed from before.
Hmm, that’s an interesting setup. I can’t figure out for the life of me why dashboard's ActiveButton is Bttn30 and Search for Invoices:count > 0
wasn’t working. Annoying, indeed!
I know! It’s so weird and this was one of those tasks I thought would take 5 minutes and it’s been round and round!
Thank you so much @mikeloc for sticking with me on it, to be honest it was motivating seeing you in the project, same as when @adamhholmes is in the project, it’s so nice to feel there is help and have someone to trigger ideas off of.
I meant why don’t you just use a dynamic value for the constraint (paid date) and do away with conditionals altogether?
Hey Adam, I don’t understand what you mean by this, it sounds like a clean solution but I can’t see what you mean? That said, it seems to be working after the back and forth yesterday which is good.
Just use a dynamic value (e.g. a number custom state) as the number of days, instead of a fixed value:
That avoids the need for any conditionals, keeps it much cleaner, and easier to modify in the future. (you would still need a conditional set for when the search is empty, to display £0.00, as a sum of empty results evaluates to empty, not zero as I initially thought it might). But it’s still cleaner and simpler than using 4 conditions to do the same thing.
That said, if it’s working as it is then great, no need to change anything.
Oh wow I didn’t know I could have a dynamic value inside a Search for
. You’re right, that would have been a more elegant solution and thank you for letting me know about it.