Alpana Posted May 3, 2008 Share Posted May 3, 2008 hi i want to know how i fill a textbox with all field created in database Link to comment Share on other sites More sharing options...
Maarten Witberg Posted May 3, 2008 Share Posted May 3, 2008 see http://www.filemaker.com/help/Script-Steps65.html If this is not what you mean, please be more specific. Link to comment Share on other sites More sharing options...
AHunter3 Posted May 3, 2008 Share Posted May 3, 2008 On the off-chance that Alpana means "please put the NAMES of all of the fields into a text field", Set Field [YourTable::Textfield, FieldNames (Get(FileName); "TableName")] where "TableName" is the name of the table you want to obtain the fieldnames from. If you want all the fieldnames of ALL of your tables, you would need to run the above function over and over for each table. Link to comment Share on other sites More sharing options...
Alpana Posted May 5, 2008 Author Share Posted May 5, 2008 Thanks AHunter3 i fetch all the column of table but problem is that in the dropdown list where i want to show all field name of table doesnot show drop down list it is show like a edit box. plz help me thanks Link to comment Share on other sites More sharing options...
AHunter3 Posted May 5, 2008 Share Posted May 5, 2008 You want a VALUE LIST of all fields in the table? You can do that, but if you add or change fields, the value list willl not update automatically. a) Create brand new table. "SingleRecordTable". Create a text field, name of field is "Fields". b) Create a new value list, name of value list is "Fields", definition of value list is use field values, all values of field "Fields" in table "SingleRecordTable". c) Format a field in your original table to have this value list as a drop-down value list. d) Change the script that you wrote, the script that I described in post #3 above, like this: Set Field [singleRecordTable::Fields, FieldNames (Get(FileName); "Your Original Table Name")] If you add or change fields, you have to run this script one more time to change the values. Attach this script to a button on a new layout of SingleRecordTable, next to the field "Fields". Link to comment Share on other sites More sharing options...
Alpana Posted May 5, 2008 Author Share Posted May 5, 2008 one more Question now if i select one column from the table(a VALUE LIST of all fields in the table) then now i want to again create a value list for that column means show records of that column in another drop down list plz help me thanks Link to comment Share on other sites More sharing options...
AHunter3 Posted May 5, 2008 Share Posted May 5, 2008 You mean if you have a field, let's call it "First Name", and you go to a field, let's call that field "SelectField" and you pick the value "First Name" from a dropdown value list of all field names in the database, you would expect your SECOND field to pop down with a value list of all of the values of First Name in your database? And if you picked "Date of Birth" on the left you'd expect a dropdown list of all the values of Date of Birth to appear in the second field's value list? And if you picked "ContainerField For PDF Attachments" on the left? There are a number of problems you'd have to deal with. a) In order for a value list to show values from a field, that field has to be indexed. But in order to pick WHAT field to show values from on the left, and have that CHOICE reflected in all the records of that table (rather than, say, the value of First Name in record #1 and the value of Weight in Kilograms in record #2 and so on), you pretty much have to use a global field for the first field. And although you could define a field as GetField (YourFirstField) to obtain the field value of any specified field, you can't index it if the first field is a global field. b) The field TYPE of field #2 would almost have to be "text", but that means you have to jump through hoops to properly display the values of non-text fields that you may reference in the first field. And forget about container field data, that's simply not going to happen. I'm not going to say it's not doable but it would be a challenge. Mind if I ask where the heck you're going with all this? Link to comment Share on other sites More sharing options...
Recommended Posts