Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1043
  • Last Modified:

Trying to conditionally count a field and produce the total in the Page header.

I'm looking to run a count on a field {HazItem} which returns either true or false.  The count should be based on if the field value is true.  This total should be accessible in the page header.  I can get it to work correctly in the footer sections, but not in the header.  The problem is the value of this formula is needed in order to feed logic in another condition on the page header.  I know that the documents execution order is what's causing this problem, but surely there must be a workaround.

I've tried adding a formula in the details section:

if ({HazItem}=true) then {HazItem}

And then in another formula ran a count against it:

count({formula}) / count({formula}, {GROUP})
0
peterseychelles
Asked:
peterseychelles
  • 2
1 Solution
 
mlmccCommented:
Try this way

if ({HazItem}=true) then 1

Now use SUM instead of COUNT

sum({formula}) / sum({formula}, {GROUP})

mlmcc
0
 
peterseychellesAuthor Commented:
God, I can't believe I didn't think of that, I was so fixated on using the count function I hadn't considered doing it like that.  That does the trick, thanks mlmcc.
0
 
mlmccCommented:
Count just counts records so if you are trying to filter the rcords to count only some of them then you need to use a trick like that.  Count doesn't look at the value just that there is a recod.

mlmcc
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now