Method Community

 

Subtotal function using SQL Override

Last post 05-12-2015 8:10 AM by Method_Audisho. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 05-11-2015 1:39 AM

    Subtotal function using SQL Override

    Hi Method,

    Does anyone experienced in SQL? I'm looking for a function to subtotal the row post it on the bottom row. Just like to Subtotal Function in Method. But because I use SQL override, the Subtotal Function is not working. Does anyone know the SQL? Below are the screenshot,

    Table

    SQL Used

    CONVERT(varchar, CAST([Amount] AS Money), 1) - As far as I know that this SQL works to make the Amount has Money format for thousand separator.

    Please advise.

  • 05-11-2015 9:11 AM In reply to

    Re: Subtotal function using SQL Override

    Answer

    Hi Jonathan,

    This isn’t going to work with the thousand separator. You are casting the value as a varchar and the subtotal function only works on a numerical field. Unfortunately, I am unaware of any workaround that you can use for this. If you need the subtotal field, you will need to remove the SQL override for the thousand separator. Sorry for the inconvenience.

    -Audisho

    Audisho Sada
    Product Manager
    Method:CRM
    a.sada@method.me
    Toll Free: 1.888.925.6238
    Local & Overseas: 416.847.0400
    Fax: 416.640.6027
  • 05-11-2015 10:52 PM In reply to

    Re: Subtotal function using SQL Override

    Hi Audisho,

    Noted on that. It might be a good upgrade for method to provide a thousand separator build-in in the table. So it has better visualisation.


    Thank you for the info!

  • 05-12-2015 8:10 AM In reply to

    Re: Subtotal function using SQL Override

    Hi Jonathan,

    Thanks for the feedback. You’ll be happy to know that we’ve already included a thousand separator option on numerical fields in Method New. You just need to select the field in the screen designer and change the option to Yes. Hopefully this will come in handy for future projects. Big Smile

    -Audisho

    Audisho Sada
    Product Manager
    Method:CRM
    a.sada@method.me
    Toll Free: 1.888.925.6238
    Local & Overseas: 416.847.0400
    Fax: 416.640.6027
Page 1 of 1 (4 items)