Skip to main content
Solved

Setting Creation Date Criteria on GI


Forum|alt.badge.img

Hello,

I have created a GI for daily orders and I am trying to set a condition so it only pulls orders created Today(). I have brought in the SOORder.CreatedDateTime and set the value1 to Today(). However that does not return any results. I am not sure it is due to the fact that the Created on has time included. But got stuck on something that fells like it should be a very easy Condition. I have included the GI below. 

 

Thoughts?

Best answer by lauraj46

Hi @byates ,

As @DavidEichner suggested, you could use the Order Date or convert Today to a datetype. 

If you do want to stick with the CreatedDateTime, a technique that I’ve found useful is to create a hidden parameter that defaults to Today.  Then you can use this parameter on the right hand side of the condition and specify the formula to convert the CreatedDateTime to a date field on the left hand side of the condition.  The GI builder is a bit particular about where formulas are allowed.  

I’ve attached a revised GI that does this.  Hope it helps.

View original
Did this topic help you find an answer to your question?

4 replies

DavidEichner
Captain II
Forum|alt.badge.img+13
  • Captain II
  • 373 replies
  • January 12, 2023

Try using the OrderDate instead:

 


DavidEichner
Captain II
Forum|alt.badge.img+13
  • Captain II
  • 373 replies
  • January 12, 2023

That worked for me.  I believe the datatype is the issue.  If you want to use the CreatedDateTime, you would need to transform it to a Date datatype before comparing to Today(). 


lauraj46
Captain II
Forum|alt.badge.img+8
  • Captain II
  • 511 replies
  • Answer
  • January 12, 2023

Hi @byates ,

As @DavidEichner suggested, you could use the Order Date or convert Today to a datetype. 

If you do want to stick with the CreatedDateTime, a technique that I’ve found useful is to create a hidden parameter that defaults to Today.  Then you can use this parameter on the right hand side of the condition and specify the formula to convert the CreatedDateTime to a date field on the left hand side of the condition.  The GI builder is a bit particular about where formulas are allowed.  

I’ve attached a revised GI that does this.  Hope it helps.


Forum|alt.badge.img
  • Author
  • 74 replies
  • January 12, 2023

Thanks all for the suggestions. As an FYI, I need to use the created date rather than the SODate so that we pickup any SOs entered “today” regardless of the SO Date. ie Today we entered SOs dated yesterday, as we would want those included in the “Today’s new SO list” I will take a look at converting to Date data type.

 

Thanks and I’ll let you know if that works!

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings