Is it possible to change the Expense Reports sample according to my need?


In the example that is made available in the BonitaSoft documentation, Expense Reports, every time the "ADD" button is clicked a new line is added to add more items to the "formInput" array, however my need would be that clicking the "ADD" The content of the fields you added in the array, however, instead of adding one more line, you would leave the same row only blank so the user could have more items in the array, is that possible?

Any tips I appreciate very much.

Link for exemple


Submitted by Lionel Palacin on Wed, 06/07/2017 - 22:24

Hi Romualdo, sorry I'm not sure I understand what you're trying to achieve. Could you try to describe it with an example?

Submitted by on Wed, 06/07/2017 - 22:41

Thanks for the feedback

What I need, for example, let's say I have two Dorpdowns, both of which display different BDM's contents, let's say the first one displays the BDM contents where the countries are stored (idPais, namePais) and the second dropdown that also displays content Of BDM, it only displays the respective states to the selected country in the first dropdown, more or less like in that image:

What I can not do is that if I select another country in the second row, I display only the respective states without changing the contents of the first row already selected, For example as in the picture, when selecting "Estados Unidos" this will interfere in the content of the first line

Sorry if there are errors in English, I'm Brazilian and I do not speak the language yet, but thanks in advance for trying to help me.

If you have any doubts, just talk.

Submitted by on Wed, 06/07/2017 - 22:49

Here is a link to you if you want to see how this is at the moment my UI Designer

Submitted by Lionel Palacin on Wed, 06/07/2017 - 23:41

I see. Yes that the tricky part of dealing with multiple container.

The easiest way to make it work is to have a form variable that contains all the states for all the countries. I assume that you have a flat list of all the states in your BDM, so it shouldn't too complicated to retrieve them.

Submitted by on Thu, 06/08/2017 - 22:21

The problem is that in my real need there are many records, so I had to adapt in another way.

I made a line control the second line is only enabled if the first one is completely filled.

But thanks for the help and for taking my doubts.

No answers yet.