User created boolean fields don't work in database views

Robert Campbell
Tera Guru

My user created boolean fields don't work in a database view.

RobertCampbell_0-1682433718298.png

 

 

TableActiveOrderLeft JoinVariable PrefixWhere Clause
incidenttrue100falsei1 
incidenttrue200falsei2

i1.sys_id = i2.sys_id

&& i2.active = 1

&& (i2.priority = 1 || i2.priority = 2)

&& i2.u_major_incident = 1

 

If view's where clause doesn't have the last line in red it works just fine.  If it does have the line in red, it gives no results although it should give many.

 

I've tried i1.sys_id = i2.sys_id && i2.u_major_incident = 1 and that also has no results.

 

I've also tried using && i2.u_major_incident = true and that doesn't work either.

 

If I change everything from '.' to '_' I get results but not the right results.  It returns everything

(i1_sys_id = i2_sys_id && i2_u_major_incident = 1 or anything (0, true, false))

8 REPLIES 8

And out of my curiosity what is the purpose of this database view? what are you trying to get with this where clause?

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,Sushant Malsure

are you getting any kind of error while looking at DB view? please share the screenshot

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,Sushant Malsure

This works

RobertCampbell_7-1682458440496.png

 

RobertCampbell_8-1682458462119.png

 

This does not

RobertCampbell_9-1682458516124.png

 

RobertCampbell_10-1682458529699.png

 

Community Alums
Not applicable

@Robert Campbell did you ever figure this one out? I am having the same issue