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
10 replies
Subscribers
5 subscribers
Views
3372 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Plug-Ins
Hi all, I'm getting a response from plugin something like below: 1
phanibabuk
over 8 years ago
Hi all,
I'm getting a response from plugin something like below:
1;2;3;4;5
A;B;C;D;E
IL;NC;SC;TX;IN
There is no limit on how many rows and columns would come in this fashion.
I need to read the above data as {"1;A;IL","2;B;"NC","3;C;SC","4,D,TX","5,E;IN"}
Each of the above would be a case in our scenario.
How can I achieve this?
Any inputs are highly appreciated!!!!!!
OriginalPostID-213135
OriginalPostID-213135
Discussion posts and replies are publicly visible
0
sagarl511
A Score Level 2
over 8 years ago
You can use merge function on your input arrays.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
phanibabuk
over 8 years ago
could you please provide a sample.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
rishub356
over 8 years ago
merge({1,2,3,4,5},{"A","B","C","D","E"})
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
harshav
over 8 years ago
apply(rule!urrule,merge({1;2;3;4;5},{A,B,C,D,E},{thirdarray}) hope this should work
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
phanibabuk
over 8 years ago
Hi harshav,
What should the custom rule contain in this case?
With the above example I'm getting a long array but again how to distinguish between each record that I'm looking for i.e.,
{{1,A,IL},{2,B,NC},{3,C,SC}}
I know we are almost there but something is missing.
Inputs please....
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
rishub356
over 8 years ago
try to use index over these.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
phanibabuk
over 8 years ago
I'm getting a long array as below:
1, A, IL, 2, B, NC, 3, C, SC, 4, D, TX, 5, E, IN
How can I get to know that 1,A,IL is one record then 2,B,NC is the second one and so on.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 8 years ago
I believe the solutions above are almost correct. Create a supporting rule (eg rule!myRule) that accepts three inputs, and that does:
{
ri!input1,
ri!input2,
ri!input3
}
Then do the following:
apply(
rule!myRule,
merge(
{1,2,3,4,5},
{A,B,C,D,E},
{IL,NC,SC,TX,IN}
)
)
Note that if you try to display the result of the apply() above, you'll see it as a flat array, as you've essentially returned an array of arrays and the expression editor can't display that any other way. To see only the first element, try wrapping the apply() in an index(<apply>,1,{}) - you should see {1,A,IL}.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 8 years ago
Alternatively, you may wish to have the supporting rule do this:
concat(
ri!input1,
";",
ri!input2,
";",
ri!input3
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
phanibabuk
over 8 years ago
that helped... thanks...
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel