- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2015 09:37 AM
Hello!
I have a custom table that contains string fields (among others). I have noticed that for SOME string fields, I have absolutely NOTHING as an operator in the condition builder when I select that field. In others, I have only three choices "is", "Is not", "is anything". A few actually have all of the operators available for a string that I would expect to see from reading the documentation on the wiki:
http://wiki.servicenow.com/index.php?title=Condition_Builder#gsc.tab=0
Can someone explain to me why I'm getting this different behavior for string fields in my table? I need to be able to fashion complex queries against some of these fields and I can't seem to figure out why this is not working. I've looking in the system dictionary and can find no difference between a field that has all 'normal' query operators available and one that does not.
Here's an example of a 'limited' string field:
Here's an example of a severely 'disenfranchised' string field:
And here's one that miraculously works as expected:
Any clues as to what might be going on would be greatly appreciated!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-24-2015 05:54 AM
For anyone in the future looking for the answer to this, I believe I have found the root cause.
When I auto created these fields, those that were strings I did NOT assign a size to since the default type is 'String' of length 40. They certainly seemed to create correctly. However, upon further investigation, these fields did NOT default as they do when being entered by hand. They seem to be something called a "Field string" or "Field class" which is derived from the type string but definitely NOT the base type 'String' that we all know and love.
Simply changing the type from blank to 'String' has solved all my problems.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-24-2015 05:26 AM
I'm not sure I understand. Do you mean the Related Links/Find Record References link? If so, that shows no record references.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-24-2015 05:54 AM
For anyone in the future looking for the answer to this, I believe I have found the root cause.
When I auto created these fields, those that were strings I did NOT assign a size to since the default type is 'String' of length 40. They certainly seemed to create correctly. However, upon further investigation, these fields did NOT default as they do when being entered by hand. They seem to be something called a "Field string" or "Field class" which is derived from the type string but definitely NOT the base type 'String' that we all know and love.
Simply changing the type from blank to 'String' has solved all my problems.