Method Community

 

Calculating information from Estimate Line Grid

Last post 05-27-2014 2:07 PM by Method_Russell. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 05-09-2014 8:44 AM

    • lruff
    • Not Ranked
    • Joined on 05-09-2014
    • Posts 4

    Calculating information from Estimate Line Grid

    Is it possible to program method to look at all lines of a grid (see sample below) and calculate sum of Total FT for only the lines that have value of "Flats" in the description and then do the same for "Corners"?  I would then need the sum of Flats and Corners added to section below that's in bold.  Can you let me know if this is possible.

    '

    Description QTY Total FT
    Liberty Flats 1 100
    Liberty Corners 1 200
    Liberty Flats 1 100

    Flats SQ-FT Total             200

    Corner SQ-FT Total           200


  • 05-09-2014 8:07 PM In reply to

    Re: Calculating information from Estimate Line Grid

    Greetings,

    This is what i would do.  Create a grid and make it so you can filter the discription collum.  In the filter section enter flats, the grid will then only show flats and add up the numbers.  When I am done with that i would change the word flats to corner so then it would add up the corners.  

    Would that help?

    John M

  • 05-12-2014 10:36 AM In reply to

    • lruff
    • Not Ranked
    • Joined on 05-09-2014
    • Posts 4

    Re: Calculating information from Estimate Line Grid

    I don't think it will work I want to auto add without having to filter.  Any other suggestion?  

    I was hoping there was a way to say if column x contains the word flats then take value from column y.  It would need to do this for each row and get sum.

  • 05-13-2014 10:09 AM In reply to

    Re: Calculating information from Estimate Line Grid

    Hi Iruff and John M,

    John, thanks for the response. That would work, but I'll suggest an approach that calculates the total without having to manually change the filter.

    Iruff, I suggest having Method actions calculate these numbers. You can have these run from the screen's OnScreenLoad, or anywhere else that makes sense for you. The actions you would use are:

    1. Assign Value to Action Result - create an action result to sum Flats, initialize it by setting the action result to 0
    2. Assign Value to Action Result - create an action result to sum Corners, initialize it by setting the action result to 0
    3. Start Loop Through Grid 
    4. Start Conditional Statement - compare the Value From Row in your Description column, equal to Liberty Flats
    5. Baic Math Calculation - increment the sum by adding the value from row Total FT column to the Flats action result
    6. End Conditional Statement
    7. Start Conditional Statement - compare the Value From Row in your Description column, equal to Liberty Corners
    8. Baic Math Calculation - increment the sum by adding the value from row Total FT column to the Corners action result
    9. End Conditional Statement
    10. End Loop Through Grid
    11. The last action(s) will display the 2 sums in whatever way you would like. For example, you could assign each action result to a label displaying the totals.

    The idea here is that these actions will loop through the grid, compare each description, and increment whichever sum is applicable. Hope this helps, please let us know if you have any questions about this.

    -Russell

  • 05-27-2014 11:39 AM In reply to

    • lruff
    • Not Ranked
    • Joined on 05-09-2014
    • Posts 4

    Re: Calculating information from Estimate Line Grid

    I must be doing something wrong becasue it's not working

  • 05-27-2014 11:40 AM In reply to

    • lruff
    • Not Ranked
    • Joined on 05-09-2014
    • Posts 4

    Re: Calculating information from Estimate Line Grid

    I must be doing something wrong because it's not working

  • 05-27-2014 2:07 PM In reply to

    Re: Calculating information from Estimate Line Grid

    Hi Iruff,

    If you can give me more information, that will help me to figure out what the issue is. Can you explain to me which actions you are using? Are you getting an error (if so, on what action), or what is happening when your actions try to calculate the 2 values? 

    -Russell

Page 1 of 1 (7 items)