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
6 subscribers
Views
2800 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
I want to populate an array with the defaults values , the size of array is dete
nileshkumarg
over 8 years ago
I want to populate an array with the defaults values , the size of array is determined at run time .
For test I create a rule with the dummy values:
with(
local!docInfo:{},
a!applyComponents(
function:append(local!docInfo,"Info"),
array:1+enumerate(5)
)
)
Here I am getting an exception :
Expression evaluation error at function a!applyComponents [line 4]: Could not cast from Text to Rule or Function Reference. Details: CastInvalidCould not cast from Text to Rule or Function Reference. Details: CastInvalid"
Can anyone let me know why this issue is arising? What needs to be done ?
OriginalPostID-168019
OriginalPostID-168019
Discussion posts and replies are publicly visible
0
Rahul Gundu
over 8 years ago
applycomponents used to literate list of components. To populate default values with an array. try like this
append(local!docInfo,repeat(sizeOfarray,defaultValue))
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
nileshkumarg
over 8 years ago
Thank you , It worked
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 8 years ago
The append is redundant - just use repeat(5, "Info").
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel