Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
3 replies
Subscribers
7 subscribers
Views
3025 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Querying with a Filter that checks substrings of integer
alexandera
A Score Level 2
over 7 years ago
How could I query a database using a!queryFilter where the field it checks is an integer and would check if the search value is included in the whole integer?
e.g. If I searched "678" and one of the record items had an Id that is 123456789, I would like that item to show up in the resulting list.
OriginalPostID-238592
Discussion posts and replies are publicly visible
0
Mike Schmitt
Certified Lead Developer
over 7 years ago
I'm not sure this is possible on a primitive integer DB column, since the string equivalent of an integer wouldn't be apparent prior to base conversion (since presumably the DB would store int valus as binary until display time). One workaround I can think of off the top of my head, which should only be minimal effort, is to create a view for the table in question containing the same column cast as some text type instead of numeric, and then you could do the normal "contains" query filter.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
melwynabrahamj
over 7 years ago
I think we cannot search the values if it is in integer value. For searching, you got to parse into text format and use appian predefined functions search it and again parse it back to integer and then you can query it. I don't think any straight forward way is there
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
vijayy700
over 7 years ago
@alexandera - you may also try this if it is feasible for you, add one more column for the value ID as a text/string (e.g. stringID) each time when ID is populated this one will also, and then you can apply "includes" operator on stringID column in your query rule, this will change the schema of your table but one time solution.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel