Skip to Content
avatar image
Former Member

[FileAdapter] Reset Counter

Hey,

I would like to reset the counter in my file adapter. Unlikely I just found [this thread|add-counter]

in this forum. But is there no other way to reset the counter as to restart

the engine? That's a poor way, isn't it?

Thanks in advanced.

chris

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Mar 13, 2008 at 03:54 PM

    HI,

    Just try to change the format of Add Counter and save and re-activate.

    This will reset the counter

    Thanks

    swarup

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      You could do with UDF with following logic:

      Get a Parameter from a global container, if NULL returned,

      then you know this is very beginning of the function.

      then you setParameter to 1, put it in your "FileName" of dynamic configuration.

      Update your Parameter by set Counter = Counter + 1

      If you get a number, check to see if the number is less than your pre-defined number (saying 100, you want to counter reach 100, then start from 1 again), if condition is true: then you put it in your FileName of dynamic configuration.

      Update your Parameter by set Counter = Counter + 1

      if condition is false, it indicates that you need to reset your counter from 1,

      Update your Parameter by set Counter = 1.

      For UDF mapping to Message Type level, do not return any thing.

      Liang