Anonymous_User Absent Member.
Absent Member.
948 views

getting all items not have a custom field


Hey fellow Soapers,

I am trying to walk through a mailbox and add
a custom field to every visited mail.

That works like a charm.

Now I want to be able to walk through
again but only look at mails I have not yet
visited.

So I am trying to create a filter based on that custom field like this (
Java)

// FilterEntry fe = new FilterEntry();
// fe.setOp(FilterOp.notExist);
// Custom custom = new Custom();
// custom.setField("MyFieldName");
// fe.setCustom(custom);
but that returns all items. ( Documentation is vague on exists )


I also tried a FilterOp.ne with my value. ( ne = not equal )
But that returns no items at all...

So any help would be appreciated.

Ray.








Labels (1)
0 Likes
4 Replies
Anonymous_User Absent Member.
Absent Member.

Re: getting all items not have a custom field

There is a problem trying to filter on the existence
on not of a custom field. I've logged a bug.

Preston

>>> On Wednesday, October 29, 2008 at 12:00 PM, Ray<ray@nospam.de> wrote:


> Hey fellow Soapers,
>
> I am trying to walk through a mailbox and add
> a custom field to every visited mail.
>
> That works like a charm.
>
> Now I want to be able to walk through
> again but only look at mails I have not yet
> visited.
>
> So I am trying to create a filter based on that custom field like this (
> Java)
>
> // FilterEntry fe = new FilterEntry();
> // fe.setOp(FilterOp.notExist);
> // Custom custom = new Custom();
> // custom.setField("MyFieldName");
> // fe.setCustom(custom);
> but that returns all items. ( Documentation is vague on exists )
>
>
> I also tried a FilterOp.ne with my value. ( ne = not equal )
> But that returns no items at all...
>
> So any help would be appreciated.
>
> Ray.

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: getting all items not have a custom field

So there's no way to filter on custom fields at all? The particular use
case we have is

a) filter and get all items with custom field existing and equal to a value
Result: returns :
1. Includ e all items with this field, value.
2. Excludes all items without field
3. Exclude all items with field but not this value

b) filter and get all items WITHOUT custom field equal to value
Result: return:
1. Include All items with this field but not this value
2. INCLUDE all items without field.
3. Exclude all items with this field, value




Preston Stephenson wrote:
> There is a problem trying to filter on the existence
> on not of a custom field. I've logged a bug.
>
> Preston
>
>>>> On Wednesday, October 29, 2008 at 12:00 PM, Ray<ray@nospam.de> wrote:

>
>> Hey fellow Soapers,
>>
>> I am trying to walk through a mailbox and add
>> a custom field to every visited mail.
>>
>> That works like a charm.
>>
>> Now I want to be able to walk through
>> again but only look at mails I have not yet
>> visited.
>>
>> So I am trying to create a filter based on that custom field like this (
>> Java)
>>
>> // FilterEntry fe = new FilterEntry();
>> // fe.setOp(FilterOp.notExist);
>> // Custom custom = new Custom();
>> // custom.setField("MyFieldName");
>> // fe.setCustom(custom);
>> but that returns all items. ( Documentation is vague on exists )
>>
>>
>> I also tried a FilterOp.ne with my value. ( ne = not equal )
>> But that returns no items at all...
>>
>> So any help would be appreciated.
>>
>> Ray.

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: getting all items not have a custom field

Sorry, I'm confused.
If you compare a custom field against a value,
you should get the a) and b) results.

Are you saying that you do not get these results?

The bug is that you can't use FilterOp.exists or
FilterOp.notExist with a custom field.

FilterOp.exists and FilterOp.notExist should would
fine with custom fields.

Let me know if that is not the case.

Preston

>>> On Thursday, October 30, 2008 at 11:12 AM, Michael

Bell<mikeNOSPAMbell90@yahoo.com> wrote:
> So there's no way to filter on custom fields at all? The particular use
> case we have is
>
> a) filter and get all items with custom field existing and equal to a

value
> Result: returns :
> 1. Includ e all items with this field, value.
> 2. Excludes all items without field
> 3. Exclude all items with field but not this value
>
> b) filter and get all items WITHOUT custom field equal to value
> Result: return:
> 1. Include All items with this field but not this value
> 2. INCLUDE all items without field.
> 3. Exclude all items with this field, value
>
>
>
>
> Preston Stephenson wrote:
>> There is a problem trying to filter on the existence
>> on not of a custom field. I've logged a bug.
>>
>> Preston
>>
>>>>> On Wednesday, October 29, 2008 at 12:00 PM, Ray<ray@nospam.de> wrote:

>>
>>> Hey fellow Soapers,
>>>
>>> I am trying to walk through a mailbox and add
>>> a custom field to every visited mail.
>>>
>>> That works like a charm.
>>>
>>> Now I want to be able to walk through
>>> again but only look at mails I have not yet
>>> visited.
>>>
>>> So I am trying to create a filter based on that custom field like this (


>>> Java)
>>>
>>> // FilterEntry fe = new FilterEntry();
>>> // fe.setOp(FilterOp.notExist);
>>> // Custom custom = new Custom();
>>> // custom.setField("MyFieldName");
>>> // fe.setCustom(custom);
>>> but that returns all items. ( Documentation is vague on exists )
>>>
>>>
>>> I also tried a FilterOp.ne with my value. ( ne = not equal )
>>> But that returns no items at all...
>>>
>>> So any help would be appreciated.
>>>
>>> Ray.

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: getting all items not have a custom field


Hey All,

The reason I had issues was
the filter behaves different for when
the CustomField is in the User DB or not.

If not, then the filter returns no items at all
( for a Name-FilterOp.ne-Value search )

If the CustomField is in the User DB
then the filter ( Name-ne-Value ) works as expected.
( i.e. give back all items with that field missing or the wrong value )

I understand there might be a future fix
which would let us find out if a custom field
exists with that FilterOp.exists operator.

Regards,
Ray.

"Preston Stephenson" <PStephenson@gw.novell.com> schrieb im Newsbeitrag
news:4909A9FE.07F1.0037.1@gw.novell.com...
> Sorry, I'm confused.
> If you compare a custom field against a value,
> you should get the a) and b) results.
>
> Are you saying that you do not get these results?
>
> The bug is that you can't use FilterOp.exists or
> FilterOp.notExist with a custom field.
>
> FilterOp.exists and FilterOp.notExist should would
> fine with custom fields.
>
> Let me know if that is not the case.
>
> Preston
>
>>>> On Thursday, October 30, 2008 at 11:12 AM, Michael

> Bell<mikeNOSPAMbell90@yahoo.com> wrote:
>> So there's no way to filter on custom fields at all? The particular use
>> case we have is
>>
>> a) filter and get all items with custom field existing and equal to a

> value
>> Result: returns :
>> 1. Includ e all items with this field, value.
>> 2. Excludes all items without field
>> 3. Exclude all items with field but not this value
>>
>> b) filter and get all items WITHOUT custom field equal to value
>> Result: return:
>> 1. Include All items with this field but not this value
>> 2. INCLUDE all items without field.
>> 3. Exclude all items with this field, value
>>
>>
>>
>>
>> Preston Stephenson wrote:
>>> There is a problem trying to filter on the existence
>>> on not of a custom field. I've logged a bug.
>>>
>>> Preston
>>>
>>>>>> On Wednesday, October 29, 2008 at 12:00 PM, Ray<ray@nospam.de> wrote:
>>>
>>>> Hey fellow Soapers,
>>>>
>>>> I am trying to walk through a mailbox and add
>>>> a custom field to every visited mail.
>>>>
>>>> That works like a charm.
>>>>
>>>> Now I want to be able to walk through
>>>> again but only look at mails I have not yet
>>>> visited.
>>>>
>>>> So I am trying to create a filter based on that custom field like this
>>>> (

>
>>>> Java)
>>>>
>>>> // FilterEntry fe = new FilterEntry();
>>>> // fe.setOp(FilterOp.notExist);
>>>> // Custom custom = new Custom();
>>>> // custom.setField("MyFieldName");
>>>> // fe.setCustom(custom);
>>>> but that returns all items. ( Documentation is vague on exists )
>>>>
>>>>
>>>> I also tried a FilterOp.ne with my value. ( ne = not equal )
>>>> But that returns no items at all...
>>>>
>>>> So any help would be appreciated.
>>>>
>>>> Ray.



0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.