Reset Number everyday

0
Hi Folks,   We have one requirement where an integer/long column should reset to 1 everyday. Basically we need to generate a token number starting from 1 everyday.    I am thinking to have one entity with an Integer/Long attribute and to have a scheduler every day to set it to 1 and increment everytime when a new object creats for it.   Apart from this can anyone suggest any better idea?
asked
4 answers
1

This calls for the use of an BeforCommit-Event on the entity (say "ThingNeedingACounter") where the objects-creation must result in an increment of your token.

Say your token is stored in entity MyCounter/Token. And your Make ThingNeedingACounter's BeforeCommit-Event trigger a flow MyCounter_IncrementCurrentNumber, which either simply adds 1 to Token, or sets Token back to 1 if the MyCounter/CurrentDate is before today, and set CurrentDate to today.

answered
0

Hi Ajay,

I thought the same logic you can try this because we have to use scheduler if we want to increase the value automatically.

answered
0

Try with schedule event 

 

Configure timing interval to daily ad create a business logic in miroflow.

image.png

answered
0

Hi,

 

Try the calaculated  value for the attribute and add a microflow logic to whenever new object is created the value need to increase to 1 and need to reset to 1 every day.

image.png

answered