1

To duplicate:

select using ".*" setting () pre {

//Determine number of homes with tvs mmarket = mediamarket:household(); }

notify("Number of Households with Tvs:= ", mmarket);

flag
Mike's answer is awesome! But to be short and sweet, your just missing the s on the your function. its mediamarket:households() not mediamarket:household() – Alex Mar 2 at 3:32

1 Answer

2

Answer

The mediamarket library function for returning the number of homes with Television sets is

mediamarket:households()

Example

ruleset a60x156 {
  meta {
    name "media market test"
    author "Mike Grace"
    description <<
      test for devex question
    >>
    logging on    
  }
  dispatch {
    domain "example.com"
  }
  rule number_of_tvs_in_house is active {
    select using ".*" setting ()
    pre {
      name = mediamarket:name();
      rank = mediamarket:rank();
      households = mediamarket:households();
      msg = << 
        Name: #{name}<br/>      
        Rank: #{rank}<br/>      
        Homes w/ TV: #{households}    
      >>;
    }
    notify("Media Market Data", msg) with sticky = true and opacity = 1;
  }

}

Example Results

notify results

link|flag

Your Answer

Get an OpenID
or

Not the answer you're looking for? Browse other questions tagged or ask your own question.