Skip to main content

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

 

15280iD41A72812AB31BA7.png

16010i726B566E7BB3227E.png

 

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 .

15573i554F3D5CB9702B35.png

 

Click on next and follow the next figures ,

Make sure to bind the fields .

17170iD7A0BC4CA3A54792.png

 

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.

AhmadYaqub.

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.

 

12530i95140F84C223B58A.png


Reply