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
8 replies
Subscribers
8 subscribers
Views
3996 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
Data From Editable Grid to be stored back in the database
sudheerp
over 7 years ago
I have created an editable grid with some values. The values are being fetched from the Database via data store. now i would like to update the changes(Addition, Deletion and updation) made in the grid to the Dashboard. Could you please guide me on how to proceed.
i have followed the steps present in the link
forum.appian.com/.../SAIL_Recipes.html
Request your assistance.
OriginalPostID-257383
Discussion posts and replies are publicly visible
0
chandolum
A Score Level 1
over 7 years ago
@Sudheeer, could you please let us know what problem you are facing I'm assuming you want to track the deleted items so that you can delete those rows, if this is a case you can refer one of the Sail recepie called track added and deleted items hope this will help you
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chandolum
A Score Level 1
over 7 years ago
Please find the link as follows
forum.appian.com/.../recipe_track_adds_and_deletes_in_an_inline_editable_grid.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sudheerp
over 7 years ago
@Chandolum: The requirement is
1. Get the values from teh Database and display it in the editable grid
2. Once the user edits and submits the form the changes are to be updated in the Database.
Step 1 is now complete. I'm unable to proceed with step 2. Wanted the guidance in achieving the step 2.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chandolum
A Score Level 1
over 7 years ago
Ok, once user has edited the details, and click on submit button you can use write to data store entity by taking the CDT(multiple) as input to data store entity. As primary key is already available for the rows it will update the data base . In case user has added new row in a grid write to data store will create new row in database. Assuming you have taken a CDT which is a multiple and saving all the data in same CDT
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
vasilisg
over 7 years ago
To my understanding you would like that the DB updates would be performed automatically, (in every change in UI you would like to change the DB imediately). I believe this is overkill for DB purposed, Its better if you access DB only once rather and not in every change, the correct path is as @chandolum suggested.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Soumya.Behera
over 7 years ago
Hi @Sudheerp, I'll tell you what I did. Once you submit the form containing the editable grid, there must be a list_type_variable which stores the data you added/edited. Now, case 1: If you have deleted some/all data then, you have to check with existing records for which one were deleted so that the deletion reflects in db. case 2: for addition/addition & updation, I don't think you have to do something uniquely except using the write to data store entity smart service. Use the smart service smartly and you're good to go.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sudheerp
over 7 years ago
How do we read the interface grid values which are modified into the Smart service "Write to Data Store Entity"?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chandolum
A Score Level 1
over 7 years ago
@Sunder, to achieve first point follow the step as follows, in a form you have to take CDT which is multiple, and you need initialize that ri value by getting the data from data base(in process model initialize the ac variable by getting the data from database) you need to map this ac variable to form input, and this ri variable will be used to display the data in grid. So coming to your second point if the user is modifying any data in grid the will be saved in same ri variable and when user clicks submit in the process model you will pass this variable to write to data store entity smart service. To be simple, instead of local!items variable (which is specified in recepie)you need to take ri variable of type multiple hope this will help you
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel