# OR condition in edge property query

**URL:** <https://community.stardog.com/t/or-condition-in-edge-property-query/3011>\
**Category:** Support\
**Created:** [April 28, 2021, 8:54pm UTC](https://community.stardog.com/t/or-condition-in-edge-property-query/3011 "2021-04-28T20:54:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigdog](https://avatars.discourse-cdn.com/v4/letter/b/46a35a/32.png) [@bigdog](https://community.stardog.com/u/bigdog)\
**Post date:** [April 28, 2021, 8:54pm UTC](https://community.stardog.com/t/or-condition-in-edge-property-query/3011/1 "2021-04-28T20:54:40Z")

</div>

Hi all,

What is the syntax for adding an OR condition for edge property based queries. For example the below restricts source edges with property :HR.

:Pete a { :since 2010 } :Engineer ;  
:worksAt { :source :HR } :Stardog

I need to add an "in" clause, like :source IN (:HR, :IT) but that syntax does not work

Thanks

---

<div class="post-metadata">

**Author:** ![jess](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/jess/32/10_2.png) [@jess](https://community.stardog.com/u/jess)\
**Post date:** [April 30, 2021, 2:41am UTC](https://community.stardog.com/t/or-condition-in-edge-property-query/3011/2 "2021-04-30T02:41:59Z")

</div>

Hi Raj,

You can bind the value to a variable, eg `{ :source ?sourceVariable }` and then `FILTER(?sourceVariable IN(:HR, :IT))`. Hope this helps.

Jess

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [May 14, 2021, 2:42am UTC](https://community.stardog.com/t/or-condition-in-edge-property-query/3011/3 "2021-05-14T02:42:43Z")

</div>

Closed on May 14, 2021, 2:42am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
