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
9 replies
Subscribers
6 subscribers
Views
3719 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Process
Hi All. I am fetching some rows from a table and storing each column in a partic
parthajitp
A Score Level 1
over 9 years ago
Hi All. I am fetching some rows from a table and storing each column in a particular process variable. The values are being stored in the process variable, separated by a comma. Now how would I extract or use one such value from the process variable.Say there are 3 values in one process variable and I would one to use each of them individually, how should I proceed? I have tried using some functions like split() but haven't been successful.
OriginalPostID-157905
OriginalPostID-157905
Discussion posts and replies are publicly visible
0
vinitl522
A Score Level 2
over 9 years ago
Hello,
Are you saving it in multiple variable, If yes then you can use apply function.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 9 years ago
@parthajip May I please know the separator you have chosen for while using split()? If you are using comma(,), I would like to suggest to use semicolon(;).
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Chris
over 9 years ago
If you are fetching directly from a table and storing into a multi-variable, they should be semicolon delimited vs comma delimited, and already prepared to be used individually with apply(). Can you post some sample data and verify your target variable type?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
parthajitp
A Score Level 1
over 9 years ago
@vinitl522 and @csteward, yeah we are saving it in a multiple variable. We did check the apply function and from the product documentation what we understood is that we will be required to use pre-defined functions.So we went ahead with the split function.Only catch is that we are now required to use another script task just to map the split values with the new set of variables which will be storing them individually.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
parthajitp
A Score Level 1
over 9 years ago
@sikhivahans the default seperator is a comma, if I am not mistaken. And so in the split function we are using it only!!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Chris
over 9 years ago
The delimiter of a multi-variable is a semi-colon (;). Can you paste the value returned from the DB here, as seen on the Variables tab of the instance?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
parthajitp
A Score Level 1
over 9 years ago
@csteward Please take a look at the screenshot of the variables tab I am attaching.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Chris
over 9 years ago
Hi, yes the varaibles appear comma delimited in monitor mode - you will also notice them semicolon delimited in the variables tab of the designer interface, under that process instance. What are you attempting to do with those 3 variables once they are populated exactly?
Also, you will not need the split() function - split() takes an input of text (single valued) and creates an array of items as a multiple variable - which you already have.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
parthajitp
A Score Level 1
over 9 years ago
@csteward Hi, Yup you are right about that. Well, we actually want to save each variable in a particular index(say in index 1) into a custom CDT of that particular type. And using split function supplemented with the index, in this manner :split(variablexyz,",")[index] we are able to segregate each values and then store them in another variable. Though this is quite a cumbersome way but it has served our purpose.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel