APIs & Integrations

LBenediktson
Member

How to get all options from a select field from HubDB from within a module?

SOLVE

Lets use an example to make it easier to understand

 

I have a list in hubdb. Each item in that list has a property called type which is then selected from the select list. Lets say it can be "Type A", "Type B" and "Type C". These are then intended to be filtered based on the type in a custom module I've created. I could create three buttons that will sort this with hardcoded type values.

The problem comes when this exact module are to be used with items in another list that has the types "Type D", "Type E" and "Type F".

 

How can i retrieve all possible options from this select?

0 Upvotes
1 Accepted solution
Teun
Solution
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

How to get all options from a select field from HubDB from within a module?

SOLVE

Hi @LBenediktson ,

 

You can use the hubdb_table_column function for this. You can simply pass it the Table ID and the Column ID (or name) and you can then access the options:

{% set column_info = hubdb_table_column(<tableID>, <columnID>)  %} 
{{ column_info.options|pprinnt }}


Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


View solution in original post

1 Reply 1
Teun
Solution
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

How to get all options from a select field from HubDB from within a module?

SOLVE

Hi @LBenediktson ,

 

You can use the hubdb_table_column function for this. You can simply pass it the Table ID and the Column ID (or name) and you can then access the options:

{% set column_info = hubdb_table_column(<tableID>, <columnID>)  %} 
{{ column_info.options|pprinnt }}


Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.