Hubdb Row Field for multiple tables

Hi

I’m currently successfully using the hubdb row field to return user selected rows (not all rows) from a single table:

 {% for item in module.hubdbrow_field %}	

 	{{ item.columns.title }}<br>
 	{{ item.columns.location }}<br>

 	etc etc

 {% endfor %}

Is there a way to use this field to allow the user to select other tables as well? I note that the table is defined in the field “content options”, but I want the user to be able to switch between different tables - ie select rows from multiple tables.

Thanks for any help!

Hey, @DM2 :waving_hand: Thank you very much for your post! It’s an interesting question, for sure. I am not a HubDB wizard, but I know a few :wink: Let’s invite them to the conversation — @Stephanie-OG @Anton @Josh, have you tackled anything similar in your recent project work?

Thank you for taking a look! — Jaycee

In order to use the HubDB row module selector field, you have to set the table in Design Manager. However, this can still be done in a slightly different way.

Here’s how I would approach this:

  • module field to select the HubDB table
  • individual module fields to select HubDB rows - you’ll need one for each selectable table
    • set each of these to be dependent on the selection of the parent HubDB table in the first

Here’s what that would look like:

Table & rows module fields setup

Row field for each selectable table set to that table

Row fields are dependent on the selection of their parent table

Thanks @erindigsmusic that’s a neat workaround!