After a lot of effort, I found out how to bind a drop downlist with the result form a stored procedure.
1 - My store procedure has result of 2 fields
exec BPM_ListarSistema
nomesistema
valor
2 - Declare a private variable with complextype
As you see on the picture bellow , I created the variable lsistema. The type of this private variable is vartypesistema, wich has two parameters: nomesistema and valor. Those two parameters have the same name of the columns that will be sent by the execution of the stored procedure BPM_ListarSistema.
The parameters and the columns from the database must match. Otherwise you'll no be able to do the binding.
lsqlsistema is the variable in wich I'll set the declaration "EXEC BPM_ListarSistema".
3 - Server Script and Nested Service
First of all, you're gonna initialize the variable lsqlsistema.
After that, you're gonna execute the stored procedure. Fort that I used a nested service. The implementation is SQL Call Stored Procedure with return ANY
4 - Coach
Now, that you already executed the stored procedure and sotored the result in the lsistema variable with complex type vartypesistema, let's do the binding.
Dynamic Binding: tw.local.lsistema[]
Dynamic Binding value: .valor
Dynamic Binding name: .nomesistema
5 - And you are done!
Nenhum comentário:
Postar um comentário