Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Suggested Answer
Replies
9 replies
Answers
2 answers
Subscribers
9 subscribers
Views
11280 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Is there a way to make parameters on an expression rule optional?...
moritzw
over 11 years ago
Is there a way to make parameters on an expression rule optional?...
OriginalPostID-35469
OriginalPostID-35469
Discussion posts and replies are publicly visible
Parents
0
krishnau3863
Certified Senior Developer
over 5 years ago
Hi moritzw,
Yes, it is optional to take parameters in expression rule, if you are going to get the data by passing any parameter then it is needful, or else without using the parameters also we directly fetch the whole data from DB.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
krishnau3863
Certified Senior Developer
over 5 years ago
Hi moritzw,
Yes, it is optional to take parameters in expression rule, if you are going to get the data by passing any parameter then it is needful, or else without using the parameters also we directly fetch the whole data from DB.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
0
Dave Lewis
Certified Lead Developer
over 5 years ago
in reply to
krishnau3863
if myRule is a function with parameters: parameter1, parameter 2, and parameter3
the following code:
rule!myRule(
parameter1: local!something
)
works just fine. Strangely,
rule!myRule(
parameter1: local!something,
parameterIJustMadeUp: local!somethingElse,
)
also happens to work just fine. It ignores what you don't send. It ignores what you do send that it doesn't recognize, and doesn't even give you a warning. If you happen to misspell one of your keywords it can be ages to find the error.
You do have to send at least one of the parameters by keyword.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel