terça-feira, 17 de dezembro de 2013

BPM Lombardi - How to set option button

Hi!

On the Coach, your gonna select the Custom HTML Control.




After you place the control on the Coach, follow the example bellow.

<script>
    $(document).ready(function() {
    document.getElementById('RadioButtons0_2').checked = true;
    document.getElementById('RadioButtons1_2').checked = true;
    document.getElementById('RadioButtons2_2').checked = true;
    document.getElementById('RadioButtons3_2').checked = true;
   });
</script>


BPM Lombardi - Current date

Hi!



I was looking for the function that would return to me the current date.
It took me two days, until my friend told me that there's no such function.
All you have to do is:

tw.local.yourdatevariable = new TWDate();

After you instantiate your variable, it automatically holds the current date.
It's really not intuitive!

segunda-feira, 9 de dezembro de 2013

BPM Lombardi - How to use variables on properties

Hi!

I was asking myself how to use the variables on the parameter value of document attachment control.

In fact, it's very simple.


Pay attention to the tags <#= and #>. There are no quotes or double quotes. Just write the variable between the tags.

And that's it.

sexta-feira, 6 de dezembro de 2013

BPM Lombardi - Bind dropdownlist with a result from database

Hi!

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!