Connection Clarification

I’m importing SQL tables which have a PK & FK. So, for example, I import a Contacts table with an FK pointing to the Clients table. I set the FK as a connection to the Client table matching the Client_Id. Then I make the Clients table Display field be the Client Name. The problem is now I longer see the FK, but rather the Client Name. I need the Client Name for the lookup value, but I want the FK maintained going forward. I understand that Knack uses it’s own invisible PK’s and FK’s which makes the relations work but it doesn’t help my problem. If I decide to leave Knack and I have Contacts with no FK’s, I can’t relate those records in another system in the future. Not to mention, I like seeing the FK which matches the PK. It’s a confidence builder of sorts. The above scenario is true for all kinds of tables. My work-around (which i haven’t employed yet) is to rename the current FK to Client Name and add a new number field called Client FK and reimport the FK. Then I will add an update rule to add the PK from the Clients table to the FK of Contacts table. I assume this will work. But it’s yet another pain.

My question is does this make sense? Or is there a better way? Or am I missing something altogether?

It makes sense, I’d use a text field and add the FK and PK so you have them for future use.

Okay thanks for the confirmation, Carl.

1 Like