select field from other table

pi511
Posts: 3
Joined: Mon Sep 07, 2015 12:37 pm

select field from other table

Postby pi511 » Mon Sep 07, 2015 12:44 pm

Let's say I have two tables
one with two columns "name" and "IP"
and the other with two columns "name" and "visit"

I want that the second table "name" column be selected from the first table, not entered manually. Is is possible?

support
Posts: 33
Joined: Mon Apr 27, 2015 5:44 pm

Re: select field from other table

Postby support » Mon Sep 07, 2015 2:41 pm

You could use relation here. Lets call you existing database "ID" for the sake of example (the one with fields "name" and "IP"). You would need to create another database, lets call it "Visits". In "Visits" database create a regular field "visit", and add a relation to "ID" database, for this example lets name this relation "ID" as well. Then when you create a table or form view in "Visits" database, you will be able to add fields from the relation "ID", in your case, you are interested in the field "Name" -- it will be added as "ID:Name". When you add a new record to "Visits", or edit existing one, you can tap on a link button of the field "ID:Name", and you will be given a table view of the related "ID" database, where you can make a selection of existing record, that will be used for the record in "Visits" that you are editing

pi511
Posts: 3
Joined: Mon Sep 07, 2015 12:37 pm

Re: select field from other table

Postby pi511 » Tue Sep 08, 2015 6:47 am

thanks, it's hard to find "new table" and "new form" entries at first glance, but now I'm used to.

but I wonder, what happens, when I setup a relation, and then add records, then delete or change the relation? are the related records still related, ie if I setup the same relation again, will all previous records be related?

support
Posts: 33
Joined: Mon Apr 27, 2015 5:44 pm

Re: select field from other table

Postby support » Tue Sep 08, 2015 12:54 pm

Currently the only way to change relation is to rename it, and that of course does not affect linked records. Deleting relation does break linking permanently, so in new relation links will have to be established again.

If you need to test something with relations, just create another one - you can have as many as you want between the same databases. This way if you decide you do not need some relations, deleting those will not affect others.

jd22hunt
Posts: 1
Joined: Tue Dec 06, 2016 3:24 am

Re: select field from other table

Postby jd22hunt » Tue Dec 06, 2016 6:18 am

I am missing something in this post.

I created the two databases, "IP" and "VISIT" and added the relation in the "Visit" database, but I do not see a link button. What does it look like, and where is it supposed to be. Also where am I supposed to see ID:Nameb or am I supposed to a dynamic relation some where?

SUGGESTION

It would be nice if you had a demo database to show things on.

support
Posts: 33
Joined: Mon Apr 27, 2015 5:44 pm

Re: select field from other table

Postby support » Tue Dec 06, 2016 4:57 pm

The fields from linked database need to be added to custom view - either table or form. At the beginning there is only single view - "All fields" - which includes only regular fields. In order to create new view tap on the button with label "All fields" and select "New table" or "New form" from menu. Select fields to be included into new view, fields from relations will be available here. When you edit record using custom form that includes fields from relation, a link button will be available. Check out the online help section for relations for further explanstions


Return to “FDB: Field Database”

Who is online

Users browsing this forum: No registered users and 1 guest

cron