Method Community

 

Report Filtering with "OR"

Last post 04-22-2010 8:16 AM by Method_Valbon. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 04-20-2010 2:39 PM

    Report Filtering with "OR"

    I know that we are allowed to use filtering, but it there a way to change it from "AND" to "OR"

    I have a customer that has a table set up with Part1, Part2, Part 3 and wants to be able to return a report that has a single part number in any of those fields.


    The way its currently set up is if I put a part number in all of those fields as a criteria, it must exist in all of those fields, which means its using the AND clause.  Is there a way to change this to OR?

    Also, is there documentation on the Advanced Script for filtering?  I might be able to perform this there if I know what syntax to use.

     

    Thanks in advance,

     

    Josh Kitzerow

    CDS

  • 04-21-2010 2:53 PM In reply to

    Re: Report Filtering with "OR"

    Hi Josh,

    Assuming you are talking about the Generate Report action in Method? If so you’re right you can take advantage of the filter options. Currently the action treats each condition as AND.

    You’re also right that you can use the Advanced Script feature to accomplish what you are looking to do. I can understand the confusion if you have never had an example to use for this area. Below is just a sample to get you in the right direction.

    1. Assign an action result to store the script. Try some of the following samples I provided below but be sure to replace ‘Part1’ with your field names.

    not ([Part1] is null or [Part2] is null or [Part3] is null)

    Depending on fields types you may want to try the following for text fields.

    isnull(cast([Part1] as nvarchar),'')<>''

    2.    In the Generate Report action use the action result for the Advanced Script.


    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
  • 04-21-2010 5:11 PM In reply to

    Re: Report Filtering with "OR"

    OK, sorry to sound like a newbie, but how to you create a script. I am referrring to your "Assign an action result to store the script." I can't find a create script function.

     

     

     

  • 04-22-2010 8:16 AM In reply to

    Re: Report Filtering with "OR"

    Answer

    Use the action in Method called ‘Assign Value To Action Result’. Give the action result a name such as ‘resultScript’ and Type In a value for the script. Basically paste the script here.

    After you save the action, be sure to order it somewhere before the action that Generates the Report. Refer to my previous post to use the script via the action result.

    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
Page 1 of 1 (4 items)