top of page
Search
Writer's pictureDave Parrish

Knack Database Keyword Connection



Navigating Keywords, Connections, and Record IDs in Database Design

Hey there, it's Dave Parrish from Knack Builders. Tonight, I’m coming to you from Mexico City, and I want to dive into a topic that’s been on my mind: the intricacies of keywords, connections, and record IDs in database applications. If you’ve ever encountered issues with sorting and searching in your databases, you might find this discussion helpful.


The Challenge of Connections

From the beginning of my journey in building databases, I’ve faced a recurring challenge: connected records and their display values. Specifically, when sorting tables or lists based on these connected values, I often found the results inconsistent. It’s frustrating, especially when you expect a straightforward sorting function to work seamlessly.


Another point of confusion has been the keyword search functionality. You might think that searching for a keyword tied to a connected value would yield expected results. Unfortunately, this isn’t always the case. I’ve often noticed that some Knack searches don’t return the anticipated results, leading to more questions than answers.


A Methodical Inquiry

Recently, through some trial and error, I stumbled upon insights that might shed light on these issues. Although it may be old news for seasoned database experts, my findings felt like a breakthrough.


I was working on an app designed to help employers find HR programs. This app includes various services categorized by type—each represented as a connection to another table. When I attempted to sort or search using these connected values, I realized the underlying complications stemmed from how these connections function.


Sorting Dilemmas

To illustrate, if I click to sort a table by a connected service type, it sometimes behaves erratically. The workaround? Instead of relying on the connection itself, I can extract and insert the actual name from the connection into the table. This approach has worked better for achieving consistent sorting results.


Keyword Search Conundrums

I also encountered issues with keyword searches. For instance, when searching for a specific term related to a service type, the returned results often didn’t align with the known quantity of records. I ran through various troubleshooting steps, checking filters and ensuring everything was correctly set up.


Eventually, I took a different approach. I created a text field that mirrors the connected service type, anticipating that this would solve the search discrepancies. The idea was to use plain text instead of relying on the connection, which often seemed to return a record ID instead of the desired text.


The Breakthrough

After setting up the text field, I performed a forced update to reindex the data. I hoped that this change would lead to accurate search results. To my surprise, it worked! The search returned relevant results based on the actual text rather than a ghost record ID. This was a game-changer.


Leveraging Text Formulas

Next, I explored using text formulas to pull in connected values. The limitation is that you can’t directly reference connected fields in text formulas, which is a bit perplexing. However, I was able to use a workaround by extracting the name from the service type connection and inserting it into the text formula.


This adjustment not only improved sorting and searching but also simplified my workflow.


Wrapping Up

While these discoveries may seem elementary to some, they have significantly streamlined my database management. If you’ve faced similar challenges with keywords, connections, and record IDs, I encourage you to experiment with these techniques. And if you have insights or feedback, I’d love to hear from you.


Thanks for joining me on this ramble through the world of database design. Happy building!


Interested in my Knack database services? ... Book a call with me here: https://calendly.com/daveparrish/callwithdave 




11 views0 comments

Comments


bottom of page