Sage 100

 View Only
  • 1.  What Should I Default To For ALL When Promoting For Parameter ?

    Posted 05-19-2021 18:17
    What’s the right way to default parameters so that if the user makes no entry they select all possible values.

    Is it blank to 9999 ?

    ---------------------------------
    Wayne Schulz - Schulz Consulting - 860-516-8990
    ---------------------------------


  • 2.  RE: What Should I Default To For ALL When Promoting For Parameter ?

    Posted 05-19-2021 18:39
    Change the parameter to optional (checkbox), then use a "hasvalue" to handle the logic.

    This is in a report filtered by ReportDate, where blank = today.


    ------------------------------
    Kevin Moyes
    Technical Systems Analyst
    Munjal White Consulting Co.
    Toronto ON
    ------------------------------



  • 3.  RE: What Should I Default To For ALL When Promoting For Parameter ?

    Posted 05-20-2021 14:37
    You just need the result of the entire evaluation to equal "true" so set the parameter to be optional and use the HasValue function and if it returns true, apply it to your field, if not, then return "true" yourself in the "Else" statement.
    If HasValue({?ItemCode}) Then 
    {CI_Item.ItemCode} Like UpperCase("*" + {?ItemCode} + "*") Else
    True​


    ------------------------------
    David Speck II
    Tennessee Software Solutions
    ------------------------------



  • 4.  RE: What Should I Default To For ALL When Promoting For Parameter ?

    Posted 05-20-2021 15:19
    Exactly... but if the parameter allows multiple selections I don't think the "like" command will work.  A simple "=" should though.

    ------------------------------
    Kevin Moyes
    Technical Systems Analyst
    Munjal White Consulting Co.
    Toronto ON
    ------------------------------



  • 5.  RE: What Should I Default To For ALL When Promoting For Parameter ?

    Posted 05-20-2021 15:24
    Yea, "Like" won't work with arrays, which is what a multiple selection parameter returns.

    ------------------------------
    David Speck II
    Tennessee Software Solutions
    ------------------------------



  • 6.  RE: What Should I Default To For ALL When Promoting For Parameter ?

    Posted 05-20-2021 16:40
    Thanks. Will this work for ranges as well?

    ------------------------------
    Wayne Schulz - Schulz Consulting - 860-516-8990
    ------------------------------



  • 7.  RE: What Should I Default To For ALL When Promoting For Parameter ?

    Posted 05-20-2021 16:47
    As long as you put your existing logic for that parameter behind an "if hasvalue..." condition: yes.

    ------------------------------
    Kevin Moyes
    Technical Systems Analyst
    Munjal White Consulting Co.
    Toronto ON
    ------------------------------