Newbies Annemarie249 Posted July 20, 2010 Newbies Posted July 20, 2010 Hi everybody, I need some help making a drop-down list in a linguistic database... The idea is that for each sentence that I analyze, I add the root verb (i.e. walk instead of walks or walked) of that sentence, which are stored in another table ("Verbs"). I have created a portal with, among other fields, the foreign key of the "Verbs" table and the field that lists all the root verbs. I want to make a drop-down list of these two related fields, with these properties: 1. if I press on the foreign key field, I want to be able to look up the relevant key, press on it and get the corresponding verb in the other field; 2. if I press on the verb field, I want to be able to look up the relevant verb, press on it and get the corresponding key number in the other field; 3. I want to be able to add new verbs which automatically also get a new ID, but I don't want to create the same record twice (i.e. I'm adding the verb 'walk' but it is already in the table, either I want a error message or I want it to just silently know OK, I don't need to add this because it's already in there). I'm not even sure 3 is possible, but I think 1 and 2 should be, right? Any help with this will be greatly appreciated! Thanks .
Newbies Annemarie249 Posted July 22, 2010 Author Newbies Posted July 22, 2010 Hi all, I've been having some problems to set up drop-down lists for some days now and I can't figure it out! This post replaces the other, older one from a few days ago... I am building a linguistic database. The main table is called 'Sentences', in which the different sentences that are part of my corpus are listed. This table is connected with various other tables, for instance one called 'Sources', in which the different books from which my sentences come are listed. Most of this information I want to take from these tables into 'Sentences' by use of a portal. I want to use drop-down lists, so I can easily pick for each sentence which book it is from. These drop-down lists pose problems, as I can't get them to work properly. The most complicated one I want to make is conditional as well. I was hoping I could get some help on this one from somebody here... The specific situation is as follows. I want to access the fields in Sentences from a table called 'Verbs' through a portal, in a drop-down list, which is conditional on the language of the sentence. The relationship structure of this part of my database is as follows. Involved are four tables, two of them join tables (which I need for other purposes) Sentences Analysis_Inbetween Verbs_Inbetween Verbs They connect in the following way: Sentences _pk_sentence_ID Analysis_Inbetween _fk_sentence_ID Verbs_Inbetween _fk_verb_ID Verbs _pk_verb_ID _pk_sentence_ID = _fk_sentence_ID = _fk_verb_ID = _pk_verb_ID The information on language comes from a table called 'Languages', and is connected with 'Sentences' as follows: Sentences _fk_language_ID Languages _pk_language_ID _pk_language_ID = _fk_language_ID I have no trouble getting fields through the portal from Verbs in Sentences, so I think there is nothing wrong with the relationships (but maybe you will disagree). Each verb, sentence, and language has it's own record. So: what I want is to put the _fk_verb_ID and the verb_root in my portal (this I have done). Then I want a drop-down list which allows me to get both the value of _fk_verb_ID and the value of verb_root. When I click on either I want it to show me the list of ID's (for _fk_verb_ID) or the list of verbs (for verb_root). Then I want to be able to click on value's from either of these list, and it should fill in BOTH fields. (so when I click on 5 in _fk_verb_ID, and this is the ID for 'laufen' ('to walk' in German), I want it to fill in both 5 in _fk_verb_ID and 'laufen' in verb_root). Then, if it is possible I also want to be able to create new records through the portal. So I can fill in the verb_root field in the portal in Sentences the verb root 'gehen' (go in German). If this verb root already has it's own record, I want it to give me either an error message or just ignore my request (and fill in the corresponding ID in _fk_verb_ID!). However, if this is not yet the case, I want it to make a new record, which at that moment also gets it's unique ID. (I have no clue whether this is at all possible!?) In addition, I want the list to be displayed for the IDs and verbs to be dependent on the language of the sentence. There will be sentences from many different languages in the database, and I won't need the whole list of all verbs from all languages to be displayed, as this will make things needlessly complicated. Each sentence is already said to belong to a specific language, so how can I use this information to 'filter' my drop-down list of verbs? The problem with the list that I have made now is that it won't display the list of records. Once I enter an ID in _fk_verb_ID or a verb in verb_root, it just gives me that combination (5 laufen), and not the whole list, which looks like: 1 gehen 2 trinken 3 lernen 4 sein 5 laufen etc. etc. Also, I have no clue to implement the language specifity in the drop-down list. Any help would be greatly appreciated!
Recommended Posts
This topic is 5238 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