Lazy reference filter in table

1
0
-1

Hello,

I am trying to fill a table with document list data that i gathered from a BDM api call. The object retrieved is a document having a lazy reference on the object person. I would like to display the person's name of each document in that table.

I can't use the variables in the UI to get the lazy reference value because each row has his own lazy reference. In the Column keys section of the UI table, i can't use the filters as following : document.person.name

could you help me display the child object's information of each row?

2 answers

1
0
-1

Hello,

You can use the REST API CONTEXT: it will do exactly what you look for.

https://community.bonitasoft.com/project/restapicontext

Have a look at this video, you will have an explanation.

https://youtu.be/Vohnf9b12pU

Maybe I have to do a video only dedicated to this aspect?

Best,

1
0
-1

Hi, are you able to deploy the person in the API call "-d=person"?

Comments

Submitted by mike_1989256 on Fri, 08/07/2020 - 11:57

Hello, I didn't understand clearly your response. Do you mean to have the API call in the UI as follows :

../API/bdm/businessData/com.bpm.document?q=getListById&p=0&c=99&f=1=3&d=person ?

Submitted by dumitru.corini_... on Fri, 08/07/2020 - 13:14

Yes, that is what I meant, adding &d=person.
As a disclaimer, I have to say that I'm not very good at bdm api calls since I don't know the api. For the "person" part, I usually check the response of the api without deploy and then I try to deploy on the necessary field.

Submitted by mike_1989256 on Fri, 08/07/2020 - 13:24

even by adding the &d=person, no results are shown. here is the API response for the call without the &d parameter :

[
{
"persistenceId": 2,
"persistenceId_string": "2",
"persistenceVersion": 0,
"persistenceVersion_string": "0",
"creationDate": "2020-08-07T11:17:28.582208Z",
"prefix": "A B",
"links": [
{
"rel": "person",
"href": "/API/bdm/businessData/com.bpm.document/2/person"
}
]
}
]

Submitted by dumitru.corini_... on Fri, 08/07/2020 - 14:22

I looked at the documentation for 7.11 and I found this https://documentation.bonitasoft.com/bonita/7.11/variables#toc1. It talks about a way to retrieve the information from a lazyRef, but only for one business data. I don't know if there is a way to retrieve the information for all of them...
Also, if you are using the Bonita 7.11, there is a feature that let's you autogenerate the form of the data model by drag and dropping an BDM object name. (I think it was introduced in 7.11)

Notifications