create list from other library

89 views
Skip to first unread message

Diego Marino

unread,
Feb 10, 2018, 3:36:50 PM2/10/18
to mementodatabase
Hi
i have two databases

1 contact
2 cities

the structure of cities is this one:
city; province; region

i have a field in contact that is a link to city

of course i can only choose the "city", but i want to set a multi-multi relation, and use not obly the cities as value, but province and region too...how may i do?



then, i saw that i can make a calendar, but found nothing on the forum....

Bill Crews

unread,
Feb 10, 2018, 4:18:47 PM2/10/18
to Diego Marino, mementodatabase
There are several ways to go about doing something like this.

1. The normalized relational way would be to add libraries for provinces and regions. This would be best for cases in which you either now or later will want to add data for provinces or regions, like statistics, populations, demographics, or whatever.

So, city would link to provinces 1-m, which would link to regions 1-m. The contacts library would link to cities 1-m and employ JavaScript fields to fetch the province and region through the links.

2. If you want to be able actually to select a city, a province, or a region from the same list, you could use a locations library that has them all; ideally no city and province or region would have the same name. In locations, you could link to locations in a couple of ways -- one for a province to a region and another for a city to a province. You might be able to figure out a way in contacts for JavaScript fields to detect the type of location and make things look both informative and valid.

3. You could probably do this using m-m links going the other way (from regions through provinces down to cities), but I'm not yet proficient doing this. I don't like the lists within entries nearly as much as I like lists of entries within libraries. Many more options for sorting, grouping, filtering, charting, and aggregation.

4. If you don't care to keep data about provinces or regions, you could just use radio buttons for those. The JavaScript fields in contacts could reach through the link to check those values and display whatever you'd like.

Diego Marino

unread,
Feb 12, 2018, 7:09:45 PM2/12/18
to mementodatabase
hi bill
maybe i explained bad....or it's not possible what i mean
i have this library ....if i use a field "link to other elements", then i can choose only values in the column "comune", not in province or region. Is there any way to make a query that allows me to select even "provincia" or "regione"
sorry if you already answered 

Bill Crews

unread,
Feb 13, 2018, 1:16:32 AM2/13/18
to Diego Marino, mementodatabase
Links link to entries by the library's entry name. The entry name is (normally) the field of role ("Display in the list as") entry name, in sequence as defined, separated by a space.

So, one thing you could do is, in cities, define as entry name region first, then province, and then city. For example, an entry might have entry name "SIC RG Acate".Then, a sorted list of them would group them by region & then by province, but it would still be a list of cities.

Would my option 3 give you what you want? You want, in one single selection, to choose either a city or a province or a region, right? That's option 3. You could select Acate or RG or SIC.

Maybe I'm still misunderstanding what you want.

Diego Marino

unread,
Feb 14, 2018, 5:49:51 AM2/14/18
to mementodatabase
sorry, i didn't understood. now i'm figuring out what you said. i'm learning the app...
Reply all
Reply to author
Forward
0 new messages