7.7.4: Displaying business data in Form based upon data entry scoped in a collection

1
0
-1

Really pulling my hair out here. Working on our first "real" bonita project. We have an instantiation form that references multiples of a business object (a LineItem) via a Collection. For each LineItem there is the requirement to enter an account code (we call it a combo code). Once the user enters an account code we want to query the BDM and have it display the details about it (so they can ensure they've entered the right code)

So, it's setup now to bind a text input to an $item.cc variable and there's a data table setup using Bonita API as the data source, with the URL up to the param={value} section. The API request parameter is set to $item.cc -- what happens is that this value is split into separate URL parameters instead of the whole string.
Screenshots:
07QTnNv.png
kWinbLi.png

How do I make the call to the BDM not split the parameters up like that?

1 answer

1
0
-1

OK. I think I solved this myself. Solution: map the data table's URL to $item.url

created a new javascript expression with the following:

var baseUrl = "../API/bdm/businessData/com.model.MyModel?c=10&p=0&q=getByComboCode&f=comboCode=";
for(var n=0;n<$data.formInput.myInput.lineItems.length;n++) {
var row = $data.formInput.myInput.lineItems[n];
if(row && row.comboCodeText) {
row.url = baseUrl+ row.comboCodeText;
}
}

Notifications