Hello
i use bonitasoft 2022.2, i have table to display data, in this table there is id column and name column, for each $item.id in the table, i want to call bonitasoft api that return name , and display it in for each item in table:
So i have used this javascript function to pass my item.id to js function to retrieve this item in variable called selected_case:
return{
contextApi : function(item){
$data.selected_case = item
return $data.caseContext
}
}
and i call this function in the table like that :
call.contextApi($item.id)
and my external api variable caseContext :
../API/bpm/case/{{selected_case}}/context
and a display the result of the api in the table in text :
{{caseContext}}
but the result i get just the last item, not for each item i get the right result from the api!
how can i call the api and get the right value foreach item?