CMS Development

CristianSabogal
Member

Adding OR condition (property) in crm_objects query

SOLVE

Hi there,

How I can define the query string to filter by property_x but many values?

I'm trying this:

 

{% set query = crm_objects("proyecto", "hs_pipeline_stage=20346536 | hs_pipeline_stage=20346539&limit=100", properties) %}

 

But, not working.

 

It seems to me inefficient to bring in this case the projects with the hs_pipeline_stage with id (20346536 and 20346539) with independent queries.

 

Thanks and regards,

 

Cristian Sabogal

 

0 Upvotes
1 Accepted solution
Indra
Solution
Guide | Elite Partner
Guide | Elite Partner

Adding OR condition (property) in crm_objects query

SOLVE

Hi @CristianSabogal,

 

I haven't tested this yet, but have you tried the following?

 


{% set query = crm_objects("proyecto", "&hs_pipeline_stage=20346536&hs_pipeline_stage=20346539&limit=100", properties) %}

 


Bureau Vet

Did my post solve your question? Help the community by marking it as a solution

View solution in original post

3 Replies 3
Indra
Solution
Guide | Elite Partner
Guide | Elite Partner

Adding OR condition (property) in crm_objects query

SOLVE

Hi @CristianSabogal,

 

I haven't tested this yet, but have you tried the following?

 


{% set query = crm_objects("proyecto", "&hs_pipeline_stage=20346536&hs_pipeline_stage=20346539&limit=100", properties) %}

 


Bureau Vet

Did my post solve your question? Help the community by marking it as a solution
CristianSabogal
Member

Adding OR condition (property) in crm_objects query

SOLVE

Hi @Indra.

 

Yes I tried this:

{% set query = crm_objects("proyecto", "&hs_pipeline_stage=20346536&hs_pipeline_stage=20346539&limit=100", properties) %}

 

But doesn't work. However I found one way to achieve it.

This works:

{% set query =crm_objects("proyecto","hs_pipeline_stage__in=20346536,25271316,25266832&limit=100", properties) %}

Jaycee_Lewis
Community Manager
Community Manager

Adding OR condition (property) in crm_objects query

SOLVE

Hi, @CristianSabogal 👋 Thanks for reaching out! Let's see if we can get the conversation going for you. Hey, @albertsg @Indra @Oezcan, do you have any suggestions or workarounds for @CristianSabogal?

 

Thank you! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes