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
7 subscribers
Views
1198 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Trifecta day: How does one create an array of CDT's such that each element
Richard
over 9 years ago
Trifecta day: How does one create an array of CDT's such that each element is identical. Our users wish to be able to order N amount of an item, then tailor the ones with unique characteristics. So say I have an array of CDT's describing standard widgets. Our uses wish to pick from our catalog and order 10 of our reverse thread 3/8mm trammel wire widgets. Then subsequently have two of them painted mauve. I want to create an array of ten, then let them change the color field to mauve on two of the ten.
Help?
OriginalPostID-156544
OriginalPostID-156544
Discussion posts and replies are publicly visible
Parents
0
PhilB
A Score Level 1
over 9 years ago
The below creates an array of widget CDTs with no colours applied. You could then map this to an editable grid and allow the colours to be changed. You'd probably want to use the id field as set when editing the grid, but then clear that element when writing to the database so that they are replaced with "real" ids.
load(
local!ids: {1,2,3},
local!names: {"Widget 1","Widget 2","Widget 3"},
local!colours: {"", "", ""},
apply(
type!widget(
id: _,
name: _,
colour: _
),
merge(
local!ids,
local!names,
local!colours
)
)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
PhilB
A Score Level 1
over 9 years ago
The below creates an array of widget CDTs with no colours applied. You could then map this to an editable grid and allow the colours to be changed. You'd probably want to use the id field as set when editing the grid, but then clear that element when writing to the database so that they are replaced with "real" ids.
load(
local!ids: {1,2,3},
local!names: {"Widget 1","Widget 2","Widget 3"},
local!colours: {"", "", ""},
apply(
type!widget(
id: _,
name: _,
colour: _
),
merge(
local!ids,
local!names,
local!colours
)
)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data