CMS Development

ProGrahamer
Mitwirkender/Mitwirkende

Can I query a 'Foreign ID' and list rows based on that query?

lösung

Hello : )

So, I'm working with a database full of courses (each row). One of the COLs I'm using is the course instructor which I made a 'Foreign ID' as the COL type. I was successful in listing (with filters) row to specific categories yesterday. But when I try to filter a COL with the 'Foreign ID' type, I'm getting a blank page.

Here are three itterations - the first one works and uses a 'selector' (id=session_category) COL type:

{% for row in hubdb_table_rows(2033946, 'session_category=3') %}

The second one is pointing to a 'foreign id' (id=select_speaker_associated) and does not work:

{% for row in hubdb_table_rows(2033946, 'select_speaker_associated=3') %}

I aslo tried the literal value instead (which is the course instructor's name):

{% for row in hubdb_table_rows(2033946, 'select_speaker_associated=Ira Bedenbaugh') %}


I was able to swap out the HTML/HUBL on this page with working HTML/HUBL and narrowed the bug down to this line. Does anyone have experience in listing Foreign ID's and if so, I would greatly appreciate any/all help. Thank you in advance.

0 Upvotes
1 Akzeptierte Lösung
alyssamwilie
Lösung
Trendsetter/-in | Elite Partner
Trendsetter/-in | Elite Partner

Can I query a 'Foreign ID' and list rows based on that query?

lösung

Try replacing spaces with a + in your filter, like so:

 

{% for row in hubdb_table_rows(2033946, 'select_speaker_associated=Ira+Bedenbaugh') %}

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.

Lösung in ursprünglichem Beitrag anzeigen

3 Antworten
alyssamwilie
Lösung
Trendsetter/-in | Elite Partner
Trendsetter/-in | Elite Partner

Can I query a 'Foreign ID' and list rows based on that query?

lösung

Try replacing spaces with a + in your filter, like so:

 

{% for row in hubdb_table_rows(2033946, 'select_speaker_associated=Ira+Bedenbaugh') %}

If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.
ProGrahamer
Mitwirkender/Mitwirkende

Can I query a 'Foreign ID' and list rows based on that query?

lösung

Alyssa!!!! You are a God-send with fantastic shoes (can not verify but will still argue this point) and you totally rock! Thank you thank you thank you!

I think if I were more proficient in back end code I'd have caught that? My experience in PHP and Hubl is limited. Can you do me one more favor? Please have a fantastic weekend!!!

Valid depiction of me right now but no tieValid depiction of me right now but no tie

alyssamwilie
Trendsetter/-in | Elite Partner
Trendsetter/-in | Elite Partner

Can I query a 'Foreign ID' and list rows based on that query?

lösung

Even those with tons of experience can miss the littlest things. A pair of fresh eyes is always helpful.

You also have a fantastic weekend!!
steve-thumbs-up.gif


If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.