Iainmck Posted May 24, 2003 Posted May 24, 2003 Hi I'm new to filemaker so be gentle... I'm attempting to create a value list (non relational) which shows a list of clients departments currently held in the DB. The DB is called "TD5_Clients", the field with this data is called "Clients_Dept" and the value list is called "Departments". So far I have..... <select name="Client_Dept"> [FMP-Valuelist:Client_Dept, list=Departemnts] <option [FMP-valuelistitem] checked>[FMP-Valuelistitem] [/FMP-ValueNames] </Select> but this only displays a list with one entry showing [FMP-Valuelistitem] [/FMP-ValueNames] I notice that the tag doesn't appear to quote the DB name i.e. "TD5_Clients" is this an issue? any help much appreciated. Iain
EddyB Posted May 24, 2003 Posted May 24, 2003 Hi, I suspect your problem is due to you opening the web page from your local disk - am I right? You cannot just open up the web page as this is not making a connection to your database, you need to go through your IP number for this to happen. In your browser type http://your.ip.number.here/ This depends on your setup, you may need http://your.ip.number.here:portNumberHere or http://your.ip.number.here/FolderNameHere Post if you need any more help Ed.
Iainmck Posted May 24, 2003 Author Posted May 24, 2003 Thanks for your prompt reply Ed, unfortunately I don't think this is the cause. I have been using http://localhost and have had no problems searching/adding records and even using portals so the connection to the DB seems fine as far as I'm aware. Iain
EddyB Posted May 24, 2003 Posted May 24, 2003 Hi, Try the code below, see if this makes a difference... <SELECT NAME='Client_Dept'> <OPTION VALUE=""> [FMP-VALUELIST: Client_Dept, LIST=Departments] <option [FMP-ValueListItem]> [FMP-VALUELISTITEM][/FMP-VALUELIST] </SELECT> Ed.
Iainmck Posted May 25, 2003 Author Posted May 25, 2003 Still no joy I'm afraid Ed. The only difference was that the HTML list now has a default value of "[FMP-VALUELIST:Client_Dept, LIST=Departments] [FMP-valuelistitem][/FMP-ValueNames]" I've tried creating a test 2n'd list just in case I was referencing something inaccurately but this produced the same result.
Unable Posted May 25, 2003 Posted May 25, 2003 Try: <SELECT NAME="Client_Dept"><!--designates the field for data entry--> [FMP-ValueList:Client_Dept, list=Departments]<!--designates the field and its associated valuelist--> <OPTION [FMP-ValueListChecked]>[FMP-ValueListItem] [/FMP-ValueList] </SELECT>
Iainmck Posted May 27, 2003 Author Posted May 27, 2003 Just to let you know the code supplied was fine, it was (as Ed originally stated) a connection problem to the DB as the list populates when I navigate to the page using a form button with hidden field specifying DB (although I suspect there is a simpler method). Thanks again for your help guys. Iain
Iainmck Posted May 27, 2003 Author Posted May 27, 2003 Next Question..... Is it possible to allow a user to enter a value not currently in a dynamic value list i.e. create and additional value? I have tried checking the behaviour "Allow entry into field" option but the HTML page still appears to restrict users to only those values already in the source table.
Anatoli Posted May 27, 2003 Posted May 27, 2003 You can submit empty value from Value list set e.g. empty as default and through standard text field -- the same as you assign to Value List -- you can submit anything user will type in.
Iainmck Posted May 27, 2003 Author Posted May 27, 2003 Thanks Anatoli but I'm not sure what you mean - I have an empty value as one of my options in the list (OPTION VALUE="") but this simply returns a null and won't allow a free-text entry. Where does the text field come in as I presumed the field type would be value list. Iain
EddyB Posted May 27, 2003 Posted May 27, 2003 Hi Iain, What Anatoli is suggesting is you have a text field AND your value list. If the user does not want one of the items in the value list, they would leave the value list field blank and enter the data into the text field. You would have 2 fields on the same page relating to the same FM field in your database. I am not sure though what would happen if a user selected an item from the list AND entered something in the text field, you should test this or maybe someone else could give you an answer. Ed.
Anatoli Posted May 27, 2003 Posted May 27, 2003 Ed, the web form will enter both into FM. And thanks for better explanation
EddyB Posted May 27, 2003 Posted May 27, 2003 No problem Anatoli! and thanks for the clarification on what would happen if users enters data in both fields. Ed.
Unable Posted May 28, 2003 Posted May 28, 2003 Re: "I am not sure though what would happen if a user selected an item from the list AND entered something in the text field, you should test this or maybe someone else could give you an answer." If "enter both into FM" is not what is desired, I'm would imagine there is an option with JavaScript to force entry from the dropdown or the "text" entry, but not both.
Recommended Posts
This topic is 7920 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now