Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
3 Ответы
15926 Представления

I'm wondering if it's possible to create a sequence that resets at the end of every day (so that it is essentially just a count of the number of records created that day).

Example format: PO-%(y)s%(month)s%(day)s- where n is the number that resets to 1 every day 

The goal is to then generate records such as:

Day 1 (July 10, 2019)

  • PO-190710-1

  • PO-190710-2

  • PO-190710-3

  • ...

Day 2 (July 11, 2019)

  • PO-190711-1

  • PO-190711-2

  • ...

Anyone know if this is possible?

Аватар
Отменить
Автор Лучший ответ

Hello Paresh,

Thank you for your reply, but what you suggest seems impractical when it comes to resetting after every day.  Are you suggesting creating a sub-sequence line for every single day? As far as I can tell, this feature is more practical for larger timeframes (years, quarterly), where the number of necessary line items is manageable.

...or perhaps I'm misunderstanding how subsequences are used?

Аватар
Отменить

Hi Mike: If you need to reset the sequence every day, this seems to be the way to do it without making any changes to the core functionality. I agree that it will be cumbersome to have an entry for each date. The other option would be to develop a customization that overrides the core functionality. You could also explore the possibility of using an automated action to generate the document number to override the default functionality.

Лучший ответ

Hi Mike:

You can define date ranges for the sequence number with the ability to reset the number i.e. start with 1, for each date range. If you change the definition of the prefix of the sequence to "PO-%(y)s%(month)s%(day)s-" and define date ranges that span 1 day each, you should get the desired result.

The definition of the sequence can be updated by going into Developer Mode and navigating to Settings > Technical > Sequences (under Sequences and Identifiers). You will need to select the "Use subsequences per date_range" checkbox to add the date ranges to the sequence definition.

Hope that helps.

Аватар
Отменить
Related Posts Ответы Просмотры Активность
2
дек. 23
29146
0
янв. 25
1369
0
апр. 24
1256
3
июл. 23
5267
1
окт. 22
3315