Loop Through Dates in Graph

How-to(s), solutions to common problems, pearls of wisdom

theresasturdivant
Posts: 2
Joined: Mon Jun 29, 2015 9:44 pm

Loop Through Dates in Graph

Postby theresasturdivant » Wed Nov 11, 2015 10:55 pm

Hello all,

I'm trying to build a graph that determines which weekdays an employee has not submitted time during the extent of his or her hire period. For example, if Employee A was hired on Monday, 11/09, and today is 11/11, the graph would check to see if Employee A has a time entry for the 9th, 10th, and 11th.

Of course, the example is simplified quite a bit. In reality, I'm running this graph for 800+ employees going as far as back as 2004.

Right now, I'm trying to use the loop function with a parameter called USE_DATE. The idea is that while USE_DATE is greater than the minimum hire date that the graph will continue to run. My issue is that I can't find a way to change the USE_DATE parameter and have it apply to the next round. USE_DATE always acts as today() regardless of reformatting at the end of the loop.

Does anyone have any suggestions as to how I can tackle this mammoth-sized problem?

Thanks,

Reese

cholastal
Posts: 107
Joined: Tue Sep 01, 2015 1:22 pm

Re: Loop Through Dates in Graph

Postby cholastal » Wed Nov 18, 2015 2:29 pm

Hi Reese

Your issue most probably relates to the fact that you are trying to change the value of that USE_DATE parameter in runtime, which is not possible due to security. More information about it can be found in this post. If you want to store values, that can be read by all components of a graph and dynamically change them via CTL code, you should use Dictionary instead. It's as easy to use as parameters and it's designed to be used this way. Please see more information about Dictionary in our documentation.

Alternatively, if you need to use and change this value in just one component, you can simply use variables. Please refer to our documentation for more information about using variables in CTL.

In case you still have troubles with the solution, please send me your graph, so I can better examine your issue.

Hope this helps.
---
Lukas Cholasta
CloverCARE Support
CloverETL | Rapid Data Integration

Visit us online at http://www.cloveretl.com
How to speed up communication with CloverCARE support


cron