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
8 subscribers
Views
4186 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Hi, I’m looking for a solution to dynamically convert a dictionary to a lis
borisb
A Score Level 1
over 9 years ago
Hi,
I’m looking for a solution to dynamically convert a dictionary to a list of dictionary with the items in the dictionary.
So for instance I have the following dictionary:
{employerId:9, advisorNumber:"AAA", id:33}
And I want to create a list with all the items in that dictionary. So basically the result should be the following:
{{employerId:9}, {advisorNumber:"AAA"},{id:33}}
This should be done dynamically since the items in the dictionary are not fixed.
Does anyone know a good solution or already build something simulair?
Thanks in advance!
OriginalPostID-188910
OriginalPostID-188910
Discussion posts and replies are publicly visible
Parents
0
marky
over 9 years ago
The apply function returns an array, so you can use the following where rule!returnSelf is a rule that returns the rule input (any type):
{
fn!apply
(
rule!returnSelf,
ri!data.employerId
),
fn!apply
(
rule!returnSelf,
ri!data.advisorNumber
),
fn!apply
(
rule!returnSelf,
ri!data.id
)
}
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
marky
over 9 years ago
The apply function returns an array, so you can use the following where rule!returnSelf is a rule that returns the rule input (any type):
{
fn!apply
(
rule!returnSelf,
ri!data.employerId
),
fn!apply
(
rule!returnSelf,
ri!data.advisorNumber
),
fn!apply
(
rule!returnSelf,
ri!data.id
)
}
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data