AnsweredAssumed Answered

Locking Product Numbers

Question asked by dinora on Aug 21, 2009
Latest reply on Aug 21, 2009 by etripoli


Locking Product Numbers


I sell tours, these tours can be operated by different suppliers so I have a table that contains all my tours for each city in each country then I have a table that has suppliers - I have yet a third table that gets connects suppliers to tours - The tour number is defined by Country Code, City Code -  Operator Number + Tour number


For example Buenos Aires Argentina, Operator 1 tour 1 will be ARBUE-0101 and then number 2 ARBUE-0102 - Assuming Operator 1 is the supplier to tour number 2 etc etc


A script is automatically creating the tour numbers, so under the operators table I have a portal where I can choose the tours and the number gets assigned based on the concept explained above


My problem is that when you go back to a portal row and click on the drop down arrow for the tour, then the tour number changes and takes the tour number of the last tour number created


So if we follow the example above tour number 3 will be ARBUE-0103 - But if I then go to tour number two and click on the drop down field to see tours it will update tour number two to be the same number as tour number 3 so I will end up with two tours ARBUE-0103


If I then go and allocate a new tour it will allocate to tour number 4 but then if I go to number 3 and click on the field for tour selection then tour number 3 becomes 4


The field that has the script to create numbers is the drop down field where I see the selection of tours to allocate


I need to lock this field or edit the script so that once a tour is allocated, that portal row is locked and the tour number does not change


Thanks in advance for your help