Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3787332
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T11:49:29+00:00 2026-05-19T11:49:29+00:00

What are valid bee sting expressions within an extended quote? rule set_persistents { select

  • 0

What are valid bee sting expressions within an extended quote?

rule set_persistents {
  select when pageview ".*"
  noop();
  always {
    ent:ecount += 1 from 1;
    app:acount += 1 from 1;
  }
}

rule test_bee_stings {
  select when pageview ".*"
  pre { 
    sum = ent:ecount + app:acount;
    content = <<
      sum is #{sum}<br/>
      sum + 1 is #{sum+1}<br/>
      ecount is #{ent:ecount}<br/>
      acount is #{app:acount}
    >>;
  }
  notify("Results", content) with sticky = true;
}

When I run this I get nothing (never see the notify box). If I remove the ecount and acount lines I get

sum is 2
sum + 1 is 21

What bee sting expressions are valid within an extended quote? Is it any different for a normal quoted string?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T11:49:30+00:00Added an answer on May 19, 2026 at 11:49 am

    Variables used in beestings in extended quotes should already have an assigned value and not be an expression. This is because beestings in extended quotes are evaluated on the client side and not the server side. I would also, for the previously explained reason, advise against using ‘sum+1’ in a beesting even though it currently works for endpoints that understand JavaScript.

    Here is how I would write what you are trying to do:

    ruleset a60x546 {
      meta {
        name "extended-quotes-beesting"
        description <<
          extended-quotes-beesting
        >>
        author "Mike Grace"
        logging on
      }
    
      rule test_bee_stings {
        select when pageview ".*"
        pre { 
          ecount = ent:ecount + 1;
          acount = app:acount + 1;
          sum = ecount + acount;
          sumplus = sum + 1;
          content = <<
            sum is #{sum}<br/>
            sum + 1 is #{sumplus}<br/>
            ecount is #{ecount}<br/>
            acount is #{acount}
          >>;
        }
        {
          notify("Results", content) with sticky = true;
        }
        always {
          ent:ecount += 1 from 1;
          app:acount += 1 from 1;
        }
      }
    }
    

    action shot of app run several times on example.com using bookmarklet:
    alt text

    *I would also advise against using a previous rules postlude to modify app and entity variables that you then use in the next rule expecting it to be incremented. While what you did works it’s semantically messy and would probably be a bit cleaner the way I have demonstrated.

    **should be taken with a grain of salt since this is only one crazy guy’s opinion. : )*

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it valid to combine MATCH with OR ? For example, SELECT * FROM
Within a valid XML file, I have the following section: <PropertyGroup> <WorkingDir>C:\SomeFolder\</WorkingDir> </PropertyGroup> <ItemGroup>
Which is the valid syntax of this query in MySQL? SELECT * FROM courses
A valid JSON Syntax is something of the kind: { username: admin, password: 123
With valid HTML the following finds the object as expected in all browsers but
Given an existing valid SVG document, what's the best way to create informational popups,
What characters are valid in a Java class name? What other rules govern Java
What are all the valid self-closing elements (e.g. <br/>) in XHTML (as implemented by
How can I generate valid XML in C#?
Create a file called Valid[File].txt and stick some text in it. Start powershell and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.