Community
Showing results for 
Search instead for 
Do you mean 
Reply

YesNo Field Lookup Criteria example?

Copper Contributor
Posts: 87
Country: USA

YesNo Field Lookup Criteria example?

I've tried everything that I can think of to construct a LookupCriteria that uses a YesNo field, but cannot past the "value does not match the column's data type" error.  I'm using the operator.enum.EqualTo - it's the only one that I can find on the enum list that lmakes sense.  I've tried values of 1, "True", True, and Act.Framework.Lookups.ValueEnum.True - all with no joy!  I've checked and double-checked that the field I'm referencing is defined as YesNo.

 

lCriteria(0) = New Act.Framework.Lookups.Criteria( _

Act.Framework.Lookups.LogicalOperator.End, _

0, _

0, _

cColumn(0), _

Act.Framework.Lookups.OperatorEnum.EqualTo, _

Act.Framework.Lookups.ValueEnum.True)

 

Anybody got anything that can help me over this little hump!  Thanks in advance,

Geoff

 

 

Geoff Blood ("The ACT! Customizer" )
The New Hampton Group

ACT Development Partner
Serving the ACC community since 1994
Copper Contributor
Posts: 87
Country: USA

Re: YesNo Field Lookup Criteria example?

Never mind - but you'll never guess how I fixed it!

 

I was actually using 2 criteria - a Contains criteria and a EqualTo True criteria.  When I had the Contains first and the EqualTo True second, it failed with the value/data type mismatch.  When I switched them around and put the EqualTo True in lCriteria(0) and the Contains in lCriteria(1), it works fine.  Not sure why, and not sure what to do when there's only a single EqualTo True condition, or when there are ONLY EqualTo True conditions, but for now, its working.

Geoff Blood ("The ACT! Customizer" )
The New Hampton Group

ACT Development Partner
Serving the ACC community since 1994