HubSpot Ideas

Rahel

HubDB rearrange order

Hi

We gathered our team members in a HubDB and have them displayed on our website. We would like to rearrange the order, e.g. make it alphabetical or change it from time to time. 

 

Is there a possibility? 

Thanks, Rahel

HubSpot Updates
August 25, 2023 12:41 PM

Hi @olokke, thanks for reaching out. I will need you to answer the same questions I asked above to help troubleshoot. 

 

When you say the listing reverts, are you referring to the actual listing of content on your website? Or the order as set within the table.

 

If the manual listing is not taking effect on your website, make sure your HubL query for the rows does not include an orderBy or sort query. The manual sort you set in a table only applies if the data is not otherwise sorted in another way in your code.

 

If the table itself is not retaining the manually set order, that sounds like it might be a bug. To confirm, you are manually dragging and dropping rows, not using the related column sorting functionality (click on column headers) which does not impact display order. Column sorting is meant to be temporary to help you manage your data, manual row reordering is designed to persist.

 

If this does not help, please send me a DM with links and some more details and we can take a look. Thanks

July 10, 2023 10:57 AM

@Deepika9041 please see my instructions in this post for how to opt your account into this BETA: https://community.hubspot.com/t5/HubSpot-Ideas/HubDB-rearrange-order/idc-p/684632/highlight/true#M121416

 

If you have any issues, please DM me your account ID and I can opt the account in. 

January 03, 2023 12:01 PM

Hi @DBoroi5,

 

When you say the listing reverts, are you referring to the actual listing of content on your website? Or the order as set within the table. 

 

If the manual listing is not taking effect on your website, make sure your HubL query for the rows does not include an orderBy or sort query. The manual sort you set in a table only applies if the data is not otherwise sorted in another way in your code. 

 

If the table itself is not retaining the manually set order, that sounds like it might be a bug. To confirm, you are manually dragging and dropping rows, not using the related column sorting BETA (click on column headers) which does not impact display order. Column sorting is meant to be temporary to help you manage your data, manual row reordering is designed to persist. 

If this does not help, please send me a DM with links and some more details and we can take a look. Thanks

September 22, 2022 09:24 AM

@HenryD just DMed you to help get you enrolled. 

@AntoineTremblay thanks for sharing that workaround. In case you did not see, this is now in public BETA. See my comment here for how to enable this for your account! https://community.hubspot.com/t5/HubSpot-Ideas/HubDB-rearrange-order/idi-p/5167#comments

In Beta
August 24, 2022 08:49 AM

Hi all,

 

Thanks for your patience with this idea. I am happy to let you all know the ability to manually re-arrange rows in a HubDB table is now in BETA. 

When opted into this BETA, when hovering over a row in HubDB table, a user can click the drag handle in the order column of the table, and move rows up and down within the table. For content that is rendering HubDB data without a developer-defined sort, the manually set order is the order that data will be returned in. 

34c40800-8dc7-4df6-9e0d-7c8caceb29a0.png

To opt into this BETA, admins can follow these instructions to opt your account into the "Drag and drop reordering of rows in HubDB tables" BETA:

Screen Shot 2022-08-24 at 11.47.54 AM.png

 

 

 

 

Looking forward to hearing your feedback! 
 

In Planning
March 16, 2022 09:37 AM

Hi all,

 

Thanks for your patience and upvotes on this idea. This is something we are currently looking into the technical feasibility of! We will be in touch as we progress, and if there is a BETA available.

 

Thank you!

46 Replies
arinker
Top Contributor | Partner

This would be awesome!

giozua
Contributor | Platinum Partner

Hi,

you can do it with thi syntax:

{% set queryparam = "&orderBy=-name_of_your_column_where_is_the_name_of_team_member" %}

note that after = there is a - (minus) character and this is to display the team in descending order (from Z -to A) but if you want the order with ascending order then delete le - (minus) character

 

Giovanni Zuanon

cph_design
Contributor

I agree this functunality seems crucial! @giozua I tried your suggestion but it doesn't seem to be working.

giozua
Contributor | Platinum Partner

This is an example that I've do 

http://www.think-inbound.com/calendario-eventi

and this is the initial query param of this example

{% set queryparam = "&orderBy=-data_evento" %}

In this case the data_evento is a date type field and the events are ordered by data_evento in descending order

 

cph_design
Contributor

Thanks @giozua looks like it works with dates no problem! I am trying to get the composers here on this page http://cts-cph-1.hs-sites.com/all-composers-composer-cph-music to show up alphabetically by last name. I have a column in the database that just has their last names in there named "composer_last_name" so I have put  {% set queryparam = "&orderBy=composer_last_name" %} but I am wondering if this just isn't possible for text yet.

cph_design
Contributor

@giozua, @Rahel, @arinker,

 

I found a solution by using this documentation https://designers.hubspot.com/docs/hubl/hubl-supported-filters under 'sort'!

 

123456 = your table number

composer_last_name = the column by which you want to sort with

 

{% set table = hubdb_table_rows(123456, queryparam)%}
{% set queryparam = hubdb_table_rows(123456, queryparam) %}

<div class="dynamic-info  row-fluid">{% if dynamic_page_hubdb_row %}        
  <span class="span5"><img src="{{ dynamic_page_hubdb_row.composer_image_url }}" /></span>
              <span class="span7">
           {{ dynamic_page_hubdb_row.composer_bio }} </span>
            <div class="clear-both"></div>
{% elif dynamic_page_hubdb_table_id %}
           <ul>
            {% for row in hubdb_table_rows(dynamic_page_hubdb_table_id)|sort(False, False, 'composer_last_name') %}
                <li><a href="{{ request.path }}/{{ row.hs_path }}">{{ row.hs_name }}</a></li>                
            {% endfor %}
           </ul>
{% endif %}
</div>

Crystal_Hopper
Key Advisor

I still think it would be more user friendly to be able to edit a Hub DB from the admin side and drag rows around to the correct order I want. I think Hubspot strives to allow users to manipulate their websites without the need for advanced coding. This is a place where this could be improved.

Qt
Contributor

@Crystal_Hopper we've been using hubDB for some time now and I (and my web developer) could swear that this was possible at one point in time. I've reached out to HS support, but they find no record of it. We really need this drag & drop sorting solution, so that we don't need a developer to help with a simple sort that isn't e.g. alphatbetical or using some other value. 

Crystal_Hopper
Key Advisor

@Qt I would have once sworn that I could drag/drop rearrange the DB tables right in the UI also. 🙂 But export to CSV, clear the DB, rearrange data in CVS, and import back to DB, is the only way I seem to be able to make things behave currently. Thank you for lending your voice to the conversation. If we get enough people in here, maybe it'll get fixed.

Qt
Contributor

@Crystal_Hopper , it's comforting to hear I'm not loosing my mind 😉 and others remember having such funcitonality in the hubDB UI at some point in time.  HS Support @NiallByrne  couldn't find any HS developer there that recalls this. I really hope too that HS product management will consider prioritizing development for this. 

cpi_jschaap
Member

I second @Crystal_Hopper suggestion. I wish there was a simpler way to re-order the HubDB records within admin without having to export, re-order in a spreadsheet, and re-upload. If data is always changing in those tables, this is not a scalable solution.

jonchim
Guide | Diamond Partner

This would be beyond amazing if we can get this feature 🙂

jwiedenheft
Contributor

Unbelieveable. I mean, if you have more than even a dozen records/rows, HubDB tables are hard to manage/edit. We just redesigned our site to use HubDB for event listings and our resource page. It's incredibly time consuming to manage.

 

Please HubSpot, update the functionality of the HubDB editor!

 

- Drag & Drop Sorting

- Filter by Column

- Search within Table

craigvarcoe
Member

Totally agree. This functionality is a basic requirement and available on most CMS platforms. HubDB requires a re-design to update the UX. 

Anonymous
Not applicable

We have 11 different HubDB tables that feed data to our website and an external XML feed - yes, it is frustrating that you can't control the order in HubDB and the "spreadsheet" like functionality is very much needed (sort, filter, search, etc.), but when you feed the info to your website, the developer can create rules for the order in which the data outputs on your site. None of ours use the default order from the HubDB table, all are controlled by other mechanisms (price low to high, date, alphabetical, etc.) and none are very time consuming to maintain, they are all data points already used.

Dan_sPeng
Member | Diamond Partner

@Anonymous What kind of rules are you using for the output? 

Anonymous
Not applicable

@Dan_sPeng I honestly don't know, we hired a HubSpot Partner to develop the feed and they were able to set parameters for how it displays. PM me if you'd like to reach out to them to see if they could point you in the right direction.

burchardta
Member

Big thumbs up to this idea. We use HubDB for a lot of things, but one of them is serving up an index of resources like guides, webinars, and case studies. We've had to create a convoluted numbering system that involves exporting the DB into Excel, manually reordering items, and reimporting into HubDB whenever we want to move content up or down the page. As our Hubspot website dev, I get this complaint a lot.

Fabian_Attard
Participant

A very simple feature which should be implemented as soon as possible. The only way to fix ordering in a table is to remove data and re-enter that data from scracth. Exporting and importing tables would take the user a lot of time. With this feature, the user is able to fix the order really easily and publish on the go.

anna_large
Member

Drag and Drop sorting would be tremendous - desperate for this one!