# SETRANGE on Option Field with \<\> operator

**URL:** <https://www.dynamicsuser.net/t/setrange-on-option-field-with-operator/54676>\
**Category:** Developers Forum\
**Created:** [September 2, 2014, 11:17am UTC](https://www.dynamicsuser.net/t/setrange-on-option-field-with-operator/54676 "2014-09-02T11:17:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![CM\_83](https://avatars.discourse-cdn.com/v4/letter/c/3ec8ea/32.png) [@CM\_83](https://www.dynamicsuser.net/u/CM_83)\
**Post date:** [September 2, 2014, 11:17am UTC](https://www.dynamicsuser.net/t/setrange-on-option-field-with-operator/54676/1 "2014-09-02T11:17:08Z")

</div>

A quick question please:

I set the below Range.

**RecordA.SETRANGE(RecordA.OptionA, RecordA.OptionA::N);**

Is it possible to use the NOT operator (\<\>) on the field?

i.e.

_RecordA.SETRANGE(RecordA.OptionA, \*\*\<\>\*\*RecordA.OptionA::N);_

_RecordA.SETRANGE(RecordA.OptionA, RecordA.OptionA::’\*\*\<\>\*\*N’);_

I used different combinations but no luck!

Thanks!

---

<div class="post-metadata">

**Author:** ![mohana\_cse06](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@mohana\_cse06](https://www.dynamicsuser.net/u/mohana_cse06)\
**Post date:** [September 2, 2014, 11:25am UTC](https://www.dynamicsuser.net/t/setrange-on-option-field-with-operator/54676/2 "2014-09-02T11:25:12Z")

</div>

Please check SETFILTER

SETFILTER(“Document Type”,’\<\>%1’,“Document Type”::Order);

---

<div class="post-metadata">

**Author:** ![CM\_83](https://avatars.discourse-cdn.com/v4/letter/c/3ec8ea/32.png) [@CM\_83](https://www.dynamicsuser.net/u/CM_83)\
**Post date:** [September 2, 2014, 11:33am UTC](https://www.dynamicsuser.net/t/setrange-on-option-field-with-operator/54676/3 "2014-09-02T11:33:24Z")

</div>

Dear Mohana,

There are up to 3 more SETRANGE statements above this statement on the same record.

By using SETFILTER it messes up the report whenever a user enters manual filters before running the report.

Any other options i could work with SETRANGE?

Thanks and regards

---

<div class="post-metadata">

**Author:** ![mohana\_cse06](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@mohana\_cse06](https://www.dynamicsuser.net/u/mohana_cse06)\
**Post date:** [September 2, 2014, 11:50am UTC](https://www.dynamicsuser.net/t/setrange-on-option-field-with-operator/54676/4 "2014-09-02T11:50:31Z")

</div>

Cant we use SETRANGE and SETFILTER together?
