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
+1
person also asked this
people also asked this
Replies
11 replies
Subscribers
8 subscribers
Views
12689 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Converting a string to an integer array
judym598
Certified Senior Developer
over 8 years ago
I have a form that captures user input to include multiple values via a checkbox field. The values are stored in a pv (integer array called pv!dataTypes_int). For example: (4;7;10), which are ids from another CDT used at a later point in the process to display data from the reference table. The integer array is then converted to a string and saved as part of a CDT (i.e., pv!newEula_cdt.dataType). In order to redisplay the values checked on that form, I have to convert the string of numbers to an integer but when I use the tointeger(pv!newEula_cdt.dataType) I get (4710). Is there a way to convert this string back to an integer and retain the semicolons?
OriginalPostID-232073
Discussion posts and replies are publicly visible
Parents
0
judym598
Certified Senior Developer
over 8 years ago
That works but it doesn't work when I replace the {1,2,3,4} with my pv which is (4;7;10). Create a rule input (i.e., dataType of type 'Text' and enter 4;7;10 as the test value) with the rule input =tointeger(touniformstring(ri!dataType)). When tested - the result is 4710 not 4;7;10
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
judym598
Certified Senior Developer
over 8 years ago
That works but it doesn't work when I replace the {1,2,3,4} with my pv which is (4;7;10). Create a rule input (i.e., dataType of type 'Text' and enter 4;7;10 as the test value) with the rule input =tointeger(touniformstring(ri!dataType)). When tested - the result is 4710 not 4;7;10
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data