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:
    184
    Likes Received:
    34
    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,557
    Likes Received:
    2,167
    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