Generate Editable List off of SQL Stored Procedures

Dear ,


I faced a problem when i had a requirment that needs my List view to become editable list , and since my SP is a "SELECT" it will only be able to generate "List View"

so i found a way that might be interesting for all users that needs to use Stored procedures and generate editable lists ,


I created simple table , and 2 simple stored procedures , 1 for getting all employees , 2 is for updating employees





Right click on the get SP , and click on edit , then navigate to Methods Tab

Note: other way is to create NEW SMO via k2 designer , and use these 2 SP's SMO's as methods inside the new SMO but in this way u will need to configure its attriibutes , but u could accomplish all with the same steps .



Click on next and follow the next figures ,

Make sure to bind the fields .



Might be a long step by step , but hope it helps !

Note: this editable list will be able to show employees and update them , if u need it to "ADD" new employees u will need to create "INSERT" stored procedure and follow same steps to add the "INSERT" SP into the SMO Methods tab .

Best Regards.


0 Kudos
1 Reply

Re: Generate Editable List off of SQL Stored Procedures

Also, if you want to step away from the web based designer and edit your smart objects in a thick client you can actually go in and change the execution type of the methods and tag them as their appropriate operations. For example if you have a stored procedure that is uspCreateUser and another that is uspUpdateUser and those both end up being exposed as methods of type list, you can go in after you have configured the methods and change the method type to correspond to the procedures intended use. It will make K2 treat them as intended when created views and the like.



0 Kudos