G
Guest
Gurus,
I would greately appreciate some input with the following. I appologize for
the long mail.
What I need to do is when I enter the data in the form and before I go to
the next record I want to save this row first in the table and then insert
two more rows with the same values (that I just entered and saved in the
table) while incrementing the index field, which I do not want the user to
enter a random value. I also want to programatically manipulate a field
value in the second and third rows before commiting. This tells me how to
increment the index field.
For Example:
Tbl-A
Reg_Num Number (Index)
Name Text (30)
Reg_Type Text (1)
Category Text (10)
Sub_Category Text (10)
Short_Desc Text (10)
Long_Desc Text (50)
1st row:
10001, "PSUS", "A","CREDIT CARD", "FEE", "CCF", "CREDIT CARD FEE"
After I enter these values I click on "SAVE" button. When I click on save,
I want to insert the same row twice (notice Reg_Num and Reg_Type values) in
the table and increment Reg_Num and change the value of Reg_Type.
2nd row:
40001, "PSUS", "W","CREDIT CARD", "FEE", "CCF", "CREDIT CARD FEE"
3rd row:
60001, "PSUS", "X","CREDIT CARD", "FEE", "CCF", "CREDIT CARD FEE"
As you see, I am incrementing the index field value by 30,000 if Reg_Type is
"W" and by 50,000 if the Reg_Type is "X". What it means is copy the row that
I just entered, insert it in the table, change the Reg_Type value and
increment Reg_Num based on the business rule. COMMIT. Do the same for the
next row.
I have about 20 Fields in the table. I do not want the user to type 10
times the same values and make mistakes. This is just an example. I have
about 8 different Reg_Types that needs to be stored in the table everytime a
new Reg_Num is entered with Type "A". User can enter any Reg_Type but to
make my life easier I'm restricting to start from Reg_Type "A". For each
Reg_Type the Reg_Num needs to be computed because it is extreamly important
in our application.
Hope I explained it right.
Thanks a million in advance.
PS
I would greately appreciate some input with the following. I appologize for
the long mail.
What I need to do is when I enter the data in the form and before I go to
the next record I want to save this row first in the table and then insert
two more rows with the same values (that I just entered and saved in the
table) while incrementing the index field, which I do not want the user to
enter a random value. I also want to programatically manipulate a field
value in the second and third rows before commiting. This tells me how to
increment the index field.
For Example:
Tbl-A
Reg_Num Number (Index)
Name Text (30)
Reg_Type Text (1)
Category Text (10)
Sub_Category Text (10)
Short_Desc Text (10)
Long_Desc Text (50)
1st row:
10001, "PSUS", "A","CREDIT CARD", "FEE", "CCF", "CREDIT CARD FEE"
After I enter these values I click on "SAVE" button. When I click on save,
I want to insert the same row twice (notice Reg_Num and Reg_Type values) in
the table and increment Reg_Num and change the value of Reg_Type.
2nd row:
40001, "PSUS", "W","CREDIT CARD", "FEE", "CCF", "CREDIT CARD FEE"
3rd row:
60001, "PSUS", "X","CREDIT CARD", "FEE", "CCF", "CREDIT CARD FEE"
As you see, I am incrementing the index field value by 30,000 if Reg_Type is
"W" and by 50,000 if the Reg_Type is "X". What it means is copy the row that
I just entered, insert it in the table, change the Reg_Type value and
increment Reg_Num based on the business rule. COMMIT. Do the same for the
next row.
I have about 20 Fields in the table. I do not want the user to type 10
times the same values and make mistakes. This is just an example. I have
about 8 different Reg_Types that needs to be stored in the table everytime a
new Reg_Num is entered with Type "A". User can enter any Reg_Type but to
make my life easier I'm restricting to start from Reg_Type "A". For each
Reg_Type the Reg_Num needs to be computed because it is extreamly important
in our application.
Hope I explained it right.
Thanks a million in advance.
PS