Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4133 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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

Posted

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]

This topic is 4133 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.