nnram Posted April 17, 2005 Share Posted April 17, 2005 I have a table which has an ID and Description field. The description field is based of a 'Value List' which is presented as a check box list. When a user checks any number of values, I want to create entries in another table for each value selected, so that there is a ID_Value pair. e.g. Table_A: ID_1 Value_1 Value_2 ID_2 Value_3 Value_7 Should become Table_B ID_1 Value_1 ID_1 Value_2 ID_2 Value_3 ID_2 Value_7 Is it possible? Any help appreciated. Link to comment Share on other sites More sharing options...
aaa Posted April 18, 2005 Share Posted April 18, 2005 Under values of your checkbox put buttons wich performs what you want. If it is necessary i will post details. Link to comment Share on other sites More sharing options...
nnram Posted April 18, 2005 Author Share Posted April 18, 2005 You mean a script (attached to the button) which will do that? It will be nice if you can post the details as I am fairly new to FM. Thanks! Link to comment Share on other sites More sharing options...
aaa Posted April 18, 2005 Share Posted April 18, 2005 First create two global fields in table A: Gl_Id, Gl_Val. Create two field Const=1 in A and B. Create relation from B to A by this Const field For B table create script near this: New record request Set Field(Id,A::Gl_Id) Set Field(Val,A::Gl_Val) Let the name of this script is New_Rec Now for A table for any Value in Val_list Create script Set Field(Check_Box_Field,"Value from your list") Set Field(Gl_Id,ID) Set Field(Gl_Val,"Value from your list") Perform Script New_Rec. Create button and put it under coresponding value in Check_box. I think that your value list dont content many values, so you will have one script for each value. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.