WilliamEvans1
8 years agoQrew Cadet
Javascript to Copy a Record n number of times and increment a numeric field?
Hi,
We have an "Items" table in Quickbase where each item has a "Month Number (1 to 12)" assigned (we don't use the "date" field, we use "month numbers").
I want the ability to add in an identical item, to the same table, up to 12 times (Month's 1 to 12) - for an item that occurs monthly.
Currently we do this by creating the first item, saving it, and then going to the menu "More>Copy This Item", changing the month number, rinse and repeat 11 times.
(We can do it slightly quicker through Grid Edit but still slow and laborious when you have hundreds of items to enter and change the month number each time).
Ideal Solution:
Ideally, i'd like a javascript button that I can put on the item form
I'd be happy with just 1. if incrementing is too difficult.... and if that's too difficult then i'd live with just a button that copied a fixed number (11) times.
NB: There's no parent/child relationship at this level.
Any pointers? I can find plenty of references to copying an item, but not copying it more than once...
Thanks!
We have an "Items" table in Quickbase where each item has a "Month Number (1 to 12)" assigned (we don't use the "date" field, we use "month numbers").
I want the ability to add in an identical item, to the same table, up to 12 times (Month's 1 to 12) - for an item that occurs monthly.
Currently we do this by creating the first item, saving it, and then going to the menu "More>Copy This Item", changing the month number, rinse and repeat 11 times.
(We can do it slightly quicker through Grid Edit but still slow and laborious when you have hundreds of items to enter and change the month number each time).
Ideal Solution:
Ideally, i'd like a javascript button that I can put on the item form
- Copy's the original item n number of times (i.e. javascript prompt that asks for the number - e.g. 5, and then it copies 5 times)
- Increments the "month number" by +1 for each copy (our month's go 1 to 12 so incrementing works).
I'd be happy with just 1. if incrementing is too difficult.... and if that's too difficult then i'd live with just a button that copied a fixed number (11) times.
NB: There's no parent/child relationship at this level.
Any pointers? I can find plenty of references to copying an item, but not copying it more than once...
Thanks!