Hi Wim,
sorry for the late reply...I only just saw your response. Don't know why my email kept it hidden for so long!
The clocknumbers are in the format ABC/DEFG123/020 and are created as follows:-
ABC = The code letters for the ad agency (in my case usually "COL" but not always)
DEFG = Product code letters relating to the product being advertised. I tend to base these on the products name.
I tend to have this field auto fill so i can re-use codes if needed
123 = This is a numeric serial number between 001 and 999.
020 = The duration of the advert in seconds
The combined clocknumber (ABC/DEFG123/020) must be unique. I need to include a check that ensures the overall combination has not been generated previously. I cannot deviate from this format either as its specific to broadcasters requirements.
Each ad that i make usually has four or five versions, with a graphic ("Tag") on the end of the ad showing which store the product is available at. So i would need to generate a new clock number for every version of the advert.
My thinking is that when creating a new Campaign record, i have three fields that should remain constant in the clocknumbers - Agency, Product Code, Duration
These should be entered into fields as one of the first steps.
Then there should be a Radio Button listing all the possible "Tags" (If a radio button is not the right one to choose i'm open to being corrected!)
Upon clicking any option on the radio button, a script should be triggered which reads the three constant fields, finds the last used serial code and picks the next one sequentially, runs the calculation to generate a new clocknumber, then adds the name of the option chosen to a related field. These are then displayed alongside each other in the portal window.
A click on the next option repeats the process.
I would enter COL in my agency field, TEST in the product field, 010 in the duration field
then with four clicks on a selection panel, my portal would display:-
COL/TEST789/010 Generic
COL/TEST790/010 Argos
COL/TEST791/010 Smyths
COL/TEST792/010 TRU
I have been figuring out Conditional Value Lists and have been able to get much of my other ideas for this database sorted, its the scripting that i have no idea where to start!
regards
Adam