July 30, 201312 yr Newbies Hi I am trying to use Set Variable to capture a date. Then I want to take that date, add one day to it and perform a find for a date range. My script looks like this Set Variable [$$Inv_date; Value:Inventory_Date::LastUpdate] Enter Find Mode Set Field [Date; ($$Inv_date)+1 &"..."& g_search_date] Perform Find It works some of the time but not consistently and I think the problem is that when I defined the variable it says "calculation result must be text" How do I get it to say "calculation result must be date"? Thanks in advance
July 30, 201312 yr Solution Variables don't let you choose a result type. There has been some discussion of how they behave under the hood -- sometimes they seem to retain their data type, but it's not always clear why. You might try adding the +1 when you set the variable, and/or do this: Set Field [Date; GetAsDate($$Inv_date)+1 &"..."& g_search_date]
July 31, 201312 yr Author Newbies Thanks Fitch! Moved the +1 to the variable definition and it seems to be working
Create an account or sign in to comment