Hi,
Not used or accessed a Stored Procedure before, can anyone offer some advice plz?
I have access to a SQL Stored Procedure (not on the K2 Server, elswehere on a SQL Server) which i want to attached to a K2 Form and run on Initialization to populate some fields on a Form.
a) Can someone explain if i need to attach the Stored Procedure in Workspace? If so, how?
b) How do i pass a paramater (UserID) from K2 to the Stored Procedure, and then pull the results back into the K2 to display the fields returned?
The idea is, that when the form loads, I want to pass the logged-in UserID from the K2 form to the SQL Stored Procedure and from the results, populate a K2 List where the user picks a single row of Data (could be 1 or more rows returned by the SQL Stored Procedure) and then when the user selects one row, then go ahead and fills in fields on the k2 form from what row i selected.
Can anyone advise?