Path: csiph.com!news.mixmin.net!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Martin =?UTF-8?Q?=CE=A4rautmann?= Newsgroups: comp.databases.filemaker Subject: Re: [FMP11] value lists and secondary fields - shows secondary value multiple times Date: Fri, 15 Sep 2023 11:06:25 +0200 Organization: slrn user Lines: 64 Message-ID: References: Reply-To: traut@gmx.de Injection-Info: dont-email.me; posting-host="f9c3e5a9323e0075eef0b0a82866621a"; logging-data="3339681"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19b+8LHFCErnRby78hOuvuu" User-Agent: slrn/1.0.3 (Darwin) Cancel-Lock: sha1:hsidtwP0ZX621RZ4rCJ0khLjn1Q= X-No-Archive: Yes Xref: csiph.com comp.databases.filemaker:3534 On Fri, 15 Sep 2023 18:02:35 +1200, Helpful Harry wrote: > I'm not sure quite why you need to bother with "first fields" and > "secondary fields". That's probably part of the weirdness you're seeing. I don't know how else to do it yet > The usual option to have have a separate table, e.g. StatesCities, > which has two fields: > > LookupState Text > > LookupCity Text check > Into this table you can import the needed data from the text file in your link. > > > Back in the People table you need a two user data enty fields: > > UserState Text > UserCity Text check > Now you need a relationship link that connects the data entered in > UserState to the list of appropriate cities from the StatesCities table: > > rel_LookupCity People::UserState = StatesCities::LookupState check > You also need to create two value lists: > > vl_StateList values from field StatesCities::LookupState > include all values > > vl_CityList values from field StatesCities::LookupCity > include only related values from rel_LookupCity Ah, that had been my mistake. I don't know why I went via secondary fields, which I usually never do. I guess that I expected more problems to re-compute the value list every time, but performance seems to be ok. > Drop-down lists using the appropriate value list. > i.e. > UserState Drop-down list, values from vl_StateList > > UserCity Drop-down list, values from vl_CityList check > When the user clicks on the UserState field they get a list of all the > states (alphabetically sorted) to choose from. Once they select a > state, the UserCity field will have a list of only the appropriate > cities (alphabetically sorted) for that state. nevertheless it was an interesting malbehavior (?) that I observed here, taking the approach with secondary fields, but receiving multiple repetetions of the city's name. Would you like to see a sample database with that problem? I guess I did not understand the usefullness of secondary fields yet.