Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

varied datatype,edit and insert problem

Status
Not open for further replies.

Jamfool

IS-IT--Management
Joined
Apr 10, 2003
Messages
484
Location
GB
Ok this problem is a bit complex so I will do my best to explain it as best I can. Please ask if u have anything u need be to clarify, and I will try my very best. Thanks to all that have a go at helping.

Ok I have got a default template property table that provides me with the following data

MainID,GroupID,Variable Name,Var1,Var2,Var3,Vartype

Example records
1,1,doors,1,4,null,n-n
2,1,rotars,1,null,null,n
3,1,economy,15,null,null,%

If you look at the records you can see that vartype relates to the values in var1, var2 and var3. For example n-n means that there is valid information in column var1 and var2, where as n means there is only valid data in var1.

Problem: 1
I need to create a form(s) that allow for data to be input into var1 only when vartype is n, var2+var1 when n-n etc. Does this need to be a form for each type?

Problem 2

Each of these may be part of a larger record. The one above for example is part of groupID. So I will need to set all these lower records in one pass, and then input them all into a new table with a new mainID set to X

Trying to sum up:

Ok there is an item that has properties. These properties have variable data recorded against them. I need to duplicate these properties, relating to this item (groupID) and then edit the fields allowed (which is set by vartype) then insert them all into a new table.
 
I'm lost. Are you trying to generate a form dynamically and want the construction of the form to be dependent upon the values in the table? That's my best guess of what you are looking for. If that's the case then all you have to do is run the query at the start of the page and generate the appropriate form elements using conditional statements. As for carrying those values back to the next page I would just use hidden elements in the form. If that's not what you are looking for then please give a bit more info on exactly how / when you want to use the information.
 
yup cheers for that. Thats exactly what i was trying to do. Ive done it now :) I used the a condition statement to auto generate the appropriate fields.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top