1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Join our Telegram chat: https://t.me/a_parser_en
    Dismiss Notice

Use "MATH" to filter results?

Discussion in 'A-Parser Support Forum' started by scrapefun, Sep 6, 2021.

  1. scrapefun

    scrapefun A-Parser Enterprise License
    A-Parser Enterprise

    Joined:
    Feb 24, 2015
    Messages:
    174
    Likes Received:
    30
    Is it possible to use the MATH function of the template toolkit to filter results?

    I want to divide the values of two variables and if less than X write to the results file? I'm thinking this is not possible but wanted to make sure.
     
  2. Support

    Support Administrator
    Staff Member A-Parser Enterprise

    Joined:
    Mar 16, 2012
    Messages:
    4,377
    Likes Received:
    2,107
    Just write the required condition in the Results format, for example:
    Code:
    [% a = 22; b = 33;
    x = 2;
    
    IF a / b < x;
        #output result
    END %]
     

Share This Page