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
5 replies
Subscribers
7 subscribers
Views
2093 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
I have a CDT and need to update its values to DB frequently. How do I update onc
nitas811
over 11 years ago
I have a CDT and need to update its values to DB frequently. How do I update once the DB has the CDT values. In case the values are there I just want to update and not insert new rows everytime. How would I do that? ...
OriginalPostID-98131
OriginalPostID-98131
Discussion posts and replies are publicly visible
0
Tim Nguyen
Appian Employee
over 11 years ago
Check out our documentation on the write to datastore smart service. Specifically, look at updating data in data store.
forum.appian.com/.../Write_to_Data_Store_Entity_Smart_Service
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Mike Cichy
Appian Employee
over 11 years ago
As long as the pv of type CDT has the value for @Id provided, the smart service will complete an update instead of insert.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
nitas811
over 11 years ago
In our case we have a combination of multiple columns that make up the unique key. How do we deal with that?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Mike Cichy
Appian Employee
over 11 years ago
Composite keys are not supported in CDTs:
forum.appian.com/.../Database_Schema_Best_Practices
You would have to use Query RDMBS smart node to operate on tables with composite keys.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Sathya Srinivasan
Appian Employee
over 11 years ago
This may not be an elegant solution but you can create another column in your table that stores the composite key as a single column value. You can use this to Map to the cdt. The challenge here is that it pushes the onus of creating and managing the pk to the developer instead of database. Apart from that, the general recommended solution is to maintain a single p.k
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel