I'm stuck on the way to use this field. I set it up on the design manager and expected a number value on frontend but I get the table data in some json encoded value.
To explain the context and the result here is the set up I made:
I have some value define in hubdb in one row with different kind of number. On this hubdb I will say I have a column total and another column total_currency.
What I try to acheve is to use a module with different block like that <Text field> <hubdb row column total> <hubdb row column currency> < rich text field>
on hubl part I have: {{ module.hubdb_total }}
on the field parameters:
column to fetch and column for choice label:
total + total_currency
format of choice label: %0 %1
and default row value I chose the value I set up so in the example 200 bn $
Now on the front end I get the json, I have no idea how to show the value instead of the json:
total 554472... {hs_id=554472..., hs_child_table_id=0, hs_updated_at=1631861664058, hs_created_at=1631861311310, total=200 }
So my question at the end is how I should put the code in the hubl part to show only the value.
Yes, at the end by using the for loop it work so it's fine so I guess we can closed the topic but if I find the reason / solution to avoid it I will let you know.
Hi @Teun , here is my screen of what I get a bit larger
The problem is not I don't get it, this screen is the front end, that's what I get with {{module.hubdb_aum||pprint}} but what I would like to show is only the 280 without the tableId and the following json.
Could you also share your code to display this on the front-end? What happens if you use {{module.hudb_aum['aum']}} ? The docs describe multiple methods to retrieve a column value: https://developers.hubspot.com/docs/cms/data/hubdb
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.
This suggests that you retrieved multiple rows with your function. Are you 100% sure that you did not use the HubDB_table field? If you click on the select, do you see 'Select a HubDB row' or do you see 'Select a HubDB table' ?
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.
What field type did you use to select the HubDB row in your module? If you used the type hubdbrow, you should also set what columns you want to fetch:
If your field name is hubdb_total, you can use {{module.hubdb_total|pprint}} to check the contents. But based on the output, it seems as if you used HubDB table field instead. Could you doublecheck if you chose the right field type?
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.