Method Community

 

Automatically filter related Invoice Line Items by Customer?

Last post 01-27-2010 12:29 PM by alex.miller. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 01-22-2010 2:39 AM

    Automatically filter related Invoice Line Items by Customer?

    In a Customer List I have added a new section called 'Invoice Line Items'. My goal is to have a grid which shows which items a particular customer has purchased.

    First, I created two new linked fields in the InvoiceLine table called 'FullNameLinked' and 'SalesRepLinked'. These grab the respective info from the Customer table.

    Then, I inserted a grid into the Customer List screen which lists items from the 'InvoiceLine' table (detached).

    I then tried to automatically filter this grid by 'SalesRepLinked' using the logged in rep from the current session (this works by itself). However, when I try to further filter it by 'FullNameLinked' matching the 'FullName' value from the screen, I get no results.

    What am I doing wrong? Is there a better way?

     

  • 01-25-2010 4:47 PM In reply to

    Re: Automatically filter related Invoice Line Items by Customer?

    Answer

    Alex,

    You can actually use an attached grid on the Customer screen. This will work nice because each time you select or change a customer record it will display the properly filtered info. A relationship between the Customer table (the one the screen is built on) and the InvoiceLine table needs to be made. Add a dropdown field to the InvoiceLine table using the existing Entity table and choose FullName as the field.

    You will need to put some actions on the invoice screen to update the newly added field on the InvoiceLine table for each line otherwise it will be blank and nothing will show up on the new grid. You can then add the sales rep to the InvoiceLine table as a linked field and easily filter the grid afterwards.

    Hope this helps,

    Need more help? Ask us about Method consulting services.

    Valbon Shabani
    Director of Education
    Method Integration Inc.
    Toll Free: 1.888.925.6238 ext. 715
    Local and overseas: 416.847.0400 ext. 715
    Fax: 416.640.6027
    E-mail: valbon@method.me
    Website: http://www.linkedin.com/in/valbon
  • 01-26-2010 3:04 PM In reply to

    Re: Automatically filter related Invoice Line Items by Customer?

    Answer

    Alex,

    Looking back at this you could still have the detached grid and add a linked field to the InvoiceLine table that gets the Customer from the Invoice table.  Then filter the grid by the full name and refresh the grid using actions on the select link.

    Need more help? Ask us about Method consulting services.

    Valbon Shabani
    Director of Education
    Method Integration Inc.
    Toll Free: 1.888.925.6238 ext. 715
    Local and overseas: 416.847.0400 ext. 715
    Fax: 416.640.6027
    E-mail: valbon@method.me
    Website: http://www.linkedin.com/in/valbon
  • 01-27-2010 12:29 PM In reply to

    Re: Automatically filter related Invoice Line Items by Customer?

    Thank you. This worked fine (actually, I didn't quite follow the first suggestion). But, I'm not sure I understand why it needs to be refreshed while other filtered grids don't need to be?

Page 1 of 1 (4 items)