Hubdb Row <<unique>>

Hi all,

I’ve been working on a new module that retrieves information from HubDB. The main goal is to retrieve all information with the same value. However, when I select a field, it doesn’t display a unique value. Instead, the field shows a long list with the same values. Does anyone have a solution or experience the same issue?

regards

Sergio

Hi @SRodriguez23 ,

Can you share a bit of the code so we can take a look at what’s going on?
It sounds like you are filtering out the value that you want, but if you use something like selectattr or rejectattr, it will return all the results that match in an array.
You could use the unique filter to return the unique values, which should leave you with an array of one item in your case.

Hi Teun,

Thanks for your answer, I’ve already used a unique function, but in this case. I’m working with Module and theme fields - HubSpot docs and this field helps the user to choose a value from HubDB. It looks like this:

regards

Sergio

Ah I misunderstood your question. Can you share your fields.json for this module? Might be something with your display columns.

Sorry, maybe I didn’t explain clearly, but here is the JSON code for this field.

, {

“id” : “c04ddb48-3cc6-22de-c5bb-f2d4886aab40”,

“name” : “hubdbrow_field”,

“display_width” : null,

“label” : “HubDB row”,

“required” : false,

“locked” : false,

“visibility” : {

“controlling_field” : null,

“controlling_field_path” : “source”,

“controlling_value_regex” : “salesforce”,

“property” : null,

“operator” : “EQUAL”,

“access” : null

},

“table_name_or_id” : “17582184”,

“columns_to_fetch” : [ “name” ],

“display_columns” : [ “name” ],

“type” : “hubdbrow”,

“default” : {

“id” : 165635858232

}

}

Regards

Sergio

What do you get if you update the display columns? Like:

“display_columns” : [ “name”, “id” ],

You could use a different column name as well.

No Luck, the ID column cannot be utilized in this field. The field continues to display the same value multiple times. However, all rows share this column, making it the sole common denominator. I may consider modifying this in the code, but the intention is to retain this field in the module as it will be used in other modules in the future.

thanks in advance