- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2018 08:40 AM
Hi All,
I am working on a requirement which requires a new attribute on a new table to be auto-generated in this format “YYYY-MM-DD-XXXXX”. Where XXXXX is reset back to zero the next day.
How can I implement this? I aware of the functionality of Number Maintenance module but I don't think that can facilitate this requirement.
Much thanks for your input 🙂
-Dominic
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2018 09:09 PM
Do you need the number to be generated prior to inserting the record?
If not, you could do a Before Insert Business Rule that sets the attribute by counting the current number of created records today then increments that result by 1 and appends the Date.
If you need the attribute value to be assigned prior to inserting the record, you will most likely need to store and increment the number elsewhere more like the existing Auto-Number functionality. this coupled with a scheduled script to reset the count at the end of the day.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2018 10:11 AM
Hi Dom;
You can write a script and update this auto number to 0 every day by scheduling it daily. So Everyday it will start from zero.
Thanks
Balaji Prusty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2018 09:09 PM
Do you need the number to be generated prior to inserting the record?
If not, you could do a Before Insert Business Rule that sets the attribute by counting the current number of created records today then increments that result by 1 and appends the Date.
If you need the attribute value to be assigned prior to inserting the record, you will most likely need to store and increment the number elsewhere more like the existing Auto-Number functionality. this coupled with a scheduled script to reset the count at the end of the day.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2018 08:31 AM
Thanks Greg,
I was able to push back on the reset back to zero requirement, and I was able to achieve the custom auto-numbering. Leaving this piece of information here in the hopes it will help somebody(if so, don't forget to mark this answer as helpful)
- Firstly, I created an auto numbering record tailored to the new table I had on the Number Maintenance module. It created a Number(u_number) field on the new table I had.
- Then I created the following before insert business rule, and it did the trick.