Sage 100

 View Only
  • 1.  Is there a way to use variables in an ALE lookup,

    Posted 04-26-2017 12:06
    Is there a way to use variables in an ALE lookup, like %today%? For example, I always want someone's lookup to default to today, without them having to change it every day.


  • 2.  RE: Is there a way to use variables in an ALE lookup,

    Posted 04-26-2017 12:09
    Oh, @DavidSpeckII - are you out there?


  • 3.  RE: Is there a way to use variables in an ALE lookup,

    Posted 04-26-2017 12:54
      |   view attached
    yep. 1. Set up a new calculated field, call it ""Today"" or something. 2. In the calculation, put the following ""STR(OrderDate) = STR(DTE(0:""%M/%D/%Y""))"". 3. Set up a pre-defined filter on the new field where it is ""equal to 1"" That's it.


  • 4.  RE: Is there a way to use variables in an ALE lookup,

    Posted 04-26-2017 13:01
    Ah, very cool! Thanks @DavidSpeckII (and @BethBowers )


  • 5.  RE: Is there a way to use variables in an ALE lookup,

    Posted 04-26-2017 13:14
    you can also use this trick to limit a lookup to only return records the user created by using this ""STR(SO_SalesOrderHeader.UserCreatedKey) = %SYS_SS'UserKey$


  • 6.  RE: Is there a way to use variables in an ALE lookup,

    Posted 04-26-2017 13:28
    Positively brilliant. Thanks, @DavidSpeckII !!!!


  • 7.  RE: Is there a way to use variables in an ALE lookup,

    Posted 04-26-2017 14:00
    Wow!! Who knew?? (Besides Beth.)


  • 8.  RE: Is there a way to use variables in an ALE lookup,

    Posted 04-26-2017 15:03
    I only knew David had done it - I certainly wouldn't know how to do it!


  • 9.  RE: Is there a way to use variables in an ALE lookup,

    Posted 04-27-2017 09:23
    Oh Wow! thank you @DavidSpeckII


  • 10.  RE: Is there a way to use variables in an ALE lookup,

    Posted 04-27-2017 09:34
    This post, http://sagecity.na.sage.com/support_communities/sage100_erp/f/97/t/38968, is where I found out you could use the %SYS_SS global variable. Then I started experimenting and found that you can also use ProvideX functions in the calculated field and adapted it to work for date fields. You can do a lot as long as your calculated field returns a boolean value (1 or 0). Dealing with string fields is a little tricky though since you can use a string property of the %SYS_SS variable by adding the dollar sign but that does not work (at least in v2015 it doesn't) for fields, you have to wrap the field in the STR() function if you are going to compare it against a string property. Also, the reason for using the DTE() function instead of the SystemDate$ property of %SYS_SS is because SystemDate$ returns the value in YYYYMMDD format and the lookup sees a date value in M/D/YYYY format.