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
5 replies
Subscribers
7 subscribers
Views
2005 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Is it possible to create a rule that has a function as a rule input? I'm try
Jason Ruvinsky
Certified Senior Developer
over 8 years ago
Is it possible to create a rule that has a function as a rule input? I'm trying to create an accessible version of the a!pickerFieldCustom, but I'm not sure it's possible for a rule to be able to take in a suggestFunction the same way this SAIL function does.
In a test, I get this error: "Expression evaluation error at function fn!error [line 23]: Rule References cannot be passed as rule inputs"
Does anyone know any clever ways around this limitation? Otherwise I'll need to copy-paste a ton of code with minor changes for each possible suggest function we use, I'd much rather have a generic version of the rule that can be plugged in wherever we use an a!pickerFieldCustom.
OriginalPostID-206210
OriginalPostID-206210
Discussion posts and replies are publicly visible
0
Craig Silver
Appian Employee
over 8 years ago
Is this what you're looking for?
forum.appian.com/.../Expressions.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Jason Ruvinsky
Certified Senior Developer
over 8 years ago
Thanks, that does seem to be what I am looking for. I'm not sure why it wasn't working for me in the test interface, but I'll give it a try in an actual call and see if it works.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 8 years ago
@jasonr I might be wrong but it seems to me that you are trying to implement as shown in the screenshot attached below. So if you take a look at the screenshot, the function will be passed via the input of the rule.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Jason Ruvinsky
Certified Senior Developer
over 8 years ago
To follow-up, I did get this to work, it just didn't like me giving it the function in the test interface - but it works when you call it that way from another rule.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 8 years ago
@jasonr Ah I see, anyhow, good to hear that it worked. I have made use of the similar approach while building a reusable paginated editable grid, where the rows attribute behaves as a rule input and possess the capability to accept the rule.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel