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
15 replies
Subscribers
7 subscribers
Views
10924 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Querying Database With Large Decimal
benjamins
over 7 years ago
Im having an issue where if I have a large decimal that I am using in my queryFilter to query the database with, the query crashes.
a!queryFilter(
field: "minDevCost",
operator: "<=",
value: ri!devCost
),
a!queryFilter(
field: "maxDevCost",
operator: ">=",
value: ri!devCost
)
The CDT field is a numeric (Decimal).
If I enter in a decimal of 9000000000, the query crashes.
if I enter in a decimal of 9000000000.00, then the query processes fine.
However, I cannot force the number to have 2 decimal places as if I use the text function
text(9000000000, "###############.##")
I get back N/A
I tried the fixed function as well and this did not work.
Any other suggestions to get this to work?
OriginalPostID-257369
Discussion posts and replies are publicly visible
0
benjamins
over 7 years ago
It appears that when I enter the number into the expression text field in the expression rule editor, the result is infinity, yet if I enter the number directly into the value, then everything seems to be working fine. This is very odd behaviour.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Karthik
over 7 years ago
What is the error that you are getting? Can you share the logs ?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
benjamins
over 7 years ago
Nothing meaningful: Expression evaluation error at function a!queryEntity [line 10]: An error occurred while retrieving the data.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Karthik
over 7 years ago
Can you share the server logs?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
benjamins
over 7 years ago
The error was in the expression editor so as far as Im aware, no logs are generated when testing rules. If you are aware of a log that I can check when testing rules, please let me know.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Karthik
over 7 years ago
application-server.log should be updated when there is any error at any rules or PMs.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
benjamins
over 7 years ago
This is cloud based and application-server.log is not updated by default without having the logging levels increased.
The jboss1-stdOut.log is not being updated with this error.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Karthik
over 7 years ago
if you appian server is "on premise", enable the logs to capture these errors in application-server.log. This log will give you exact info abt the problem
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
aloks0189
Certified Lead Developer
over 7 years ago
@benjamin try using, value: todecimal(ri!devCost)
As you are facing issue with integer whereas decimal works fine for you, so try converting integer to decimal while passing it to queryEntity ,
Hope this will help you
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
benjamins
over 7 years ago
todecimal doesnt work either. The input is already a numeric(decimal) anyway.
Just to be clear, the issue is not with my code, it appears to be an issue with the expression editor. When a large number is entered into the expression field, the value is infinity which causes the rule to fail when trying to test the rule. Entering the same value into the value field works fine.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>