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
14 replies
Subscribers
7 subscribers
Views
5371 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
The function "doforeach" allows me to call a function by string. I use
shelzle
over 12 years ago
The function "doforeach" allows me to call a function by string. I use this to dynamically call a function that is defined in a text PV of a process. Is there any other method to do dynamic function calls? The new looping function "apply" does not work....
OriginalPostID-65702
OriginalPostID-65702
Discussion posts and replies are publicly visible
0
shelzle
over 12 years ago
We are on 7.0.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Annelise Dubrovsky
Appian Employee
over 12 years ago
I'm glad you brought this up Stefan, because I've been looking for such a use case, so I'd like to understand this a little better in order to know where the appropriate enhancement would fall.
How are you determining the value of the text PV that each process should have?
Side note: I'd tweak Owen's example slightly and say:
apply(
if(pv!text="a", rule!a, if(pv!text="b", rule!b, ...)),
{ri!data}
)
If you're at Appian World, I'd be happy to meet with you tomorrow (Wednesday) to discuss in person.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
shelzle
over 12 years ago
Hi Annelise, in my framework I have a single process model called "ticket" which has two data containers. One is defined as a static CDT PV which contains the basic data each ticket has. To display this data in different fashions this CDT has a field "template" which maps to a HTML template file and is rendered using "textfromtemplate". The other data container is a PV of type text which contains the externalized data of a CDT which content depends on the type of the ticket. To be able to display this data on the single ticket dashboard I use a "display_x" function that internalizes this data and renders it using "textfromtemplate" as well. Now my first CDT has a field of type text that holds exactly the name of this function.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
shelzle
over 12 years ago
In a ticket type specific setup process that runs just before the ticket process is created all this setup stuff is done. So what I wanted to know is: Is there any other way to call a function by name except of my hack with doforeach?
I hope I was able to explain what I did here :-)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
<