How to display BDM in table

I need to display the records that are in my BDM in UI Designer, so far I have only been able to display what is in my process variable, through the following code:
../API/bpm/caseVariable/{{task.caseId}}/listaTransportadoras

However I need to display my BDM records in a table in the UI Designer, how can I do this?

I tried to create an API like this:

../{{context.transportadoras_ref.link}}

And I called the attributes of my BDM like this:

retorno.status

But the return was empty, what do I need to change to return have the attribute value of my BDM?

Have you read the Getting Started Tutorial? All the information you need is in there…

http://documentation.bonitasoft.com/?page=getting-started-tutorial

regards
Seán

PS: While you may not like the answer, it gives a possible solution, please mark as resolved.

Hi

Sorry I was Not able to Open the BOS file as I am using a Lower Version of Bonita.

I have the BOS file. I will test it out later.

For Now , I have Uploaded screenshot of My Pages where I use the context.ref to Pull Data and Display inside the Page.

Let Me know If you are able to access the Screenshots and iF it Helps you in any way.

Alternately I can open your BOS file once I download a Higher version of Bonita .

Hi

Sorry I was Not able to Open the BOS file as I am using a Lower Version of Bonita.

I have the BOS file. I will test it out later.

For Now , I have Uploaded screenshot of My Pages where I use the context.ref to Pull Data and Display inside the Page.

Let Me know If you are able to access the Screenshots and iF it Helps you in any way.

Alternately I can open your BOS file once I download a Higher version of Bonita .
Here Is the Link

https://goo.gl/photos/qdCmhGr3SkzQZFgg6

If you want to Display the BDM records inside an Application page(Outside the Portal) .Then you will need a Separate API
/bonita/API/bdm/businessData/com.model.Table_name?q=find&p=0&c=10000

Hi

You have the Correct Procedure. Maybe you got the naming incorrect .

Inside your Form, Add a text Field. Replace all the text with {{context}} .
Preview the Page. It should Pull up the correct Ref link.

this is How i check most of Issues .
Hope this helps .

Thanks for trying to help me, I did what you indicated but the Text field returned blank by placing {{context}},
So when putting in an input field it returned me this: “{{properties.placeholder | uiTranslate}}”
Just to confirm, it’s literally {{context}} in a text field, or the name of my variable that’s receiving my REST API

@romualdo.s.rs

the Text field returned blank by placing {{context}}

This is expected, because Context only references Business Data, not process variables. It’s really annoying.

So if you are getting nothing are you sure you’ve added the BDM to the Data? If not then it will show nothing, if you have then is there any data in it?

Add a new External API variable to the page and give is

…/API/bdm/businessData/com.company.model.Customer?q=find&p=0&c=100

where com.company.model.Customer is your BDM. You MUST have the q, c and p parameters.

Add a new table to the page

In Content click the button so it shows a white X on dark blue (expression or variable) and type the name of your variable above.

in COLUMN KEYS - you MUST specify the columns you want in the table to show. Note this must be left as fx

That’s it should work now…

Note as follows:

{{properties.placeholder | uiTranslate}} comes back when it cannot parse the value and therefore cannot display anything.

It really is {{ context }} in the text field, though we actually put text is to describe it to help us know what it is…

Context: {{ context }}

for example.

regards
Seán

I read the tutorial but did not understand how I can get the contents of my BDM attributes and display in a table in the UI Designer, could you give me an example of how I can do this? I will add the link to my .BOS file from my process, if you can see what I can do to accomplish this task I thank you very much

https://drive.google.com/file/d/0B8aMiLwwVY0nUFl1MUdQYkFaRkk/view?usp=sharing

I looked your images, and apparently their settings are the same as the way I set it, I believe that when you can take a look at my .BOS file, you will understand why I am not understanding what is happening to not display the information of the attributes

OK.
In that Case , I will have a look later Today. I can Reply Tomorrow.
I have a Question.
This page where you want to Display the Attributes.

  1. Is it inside a Portal Task ( Portal Form) .
  2. Is it a Separate Application Page . Outside the portal .

Answering your question, I believe it is within a task that has this Form (I am new to Bonitasoft and do not know the correct nomenclature). Another thing I checked for an APi External variable as you suggested in the answer, I am sending the link of the image to you to see the result

https://drive.google.com/file/d/0B8aMiLwwVY0nbFBTSE5sUVRMQTA/view?usp=sharing
https://drive.google.com/file/d/0B8aMiLwwVY0nVDNhTk1nalFIeW8/view?usp=sharing

Reseted my BDM and add a new item that arrest had added:

https://drive.google.com/file/d/0B8aMiLwwVY0ncG10QWFES2t1V1k/view?usp=sharing

But I can not determine that he brings me the name of the carrier, for example

Hi

From the Screenshot , I dont see the the task Id variable.
You should have a task id Variable Defined .

task Id = …/API/bpm/userTask/{{taskId}}

I added the variable, after that I need to change something else, because the result of the table was the same.

https://drive.google.com/file/d/0B8aMiLwwVY0nOEZHQnhCNGl5WEU/view?usp=sharing

Hi

I took a look into the BOS file.

I realised that If you using a table then context_ref.link will not work here.
Rather you have to define the Actual link it self.

Here is the Link that worked for me.
…/API/bdm/businessData/com.hss.model.Transportadora?q=find&c=100000&p=0

I have made small adjustments to the BOS file. Do check it out

https://drive.google.com/file/d/0B-MHHSlP6-kMZUVHb3NoeGk4QjA/view?usp=sharing

Thanks for the feedback,

I tried to open the .BOS file that you edited, but it is in a version higher than mine (You sent it in 7.4.2 and I have version 7.3.3 installed)

Hi
I will try to create a sample in 7.3.3 tomorrow and upload .

Did you try with the …/API/bdm/businessData/com.hss.model.Transportadora?q=find&c=100000&p=0
It worked for me.

Good morning, thanks for the feedback. I’ve made some progress in my work and I’m already able to display the BDM table information in the UI Designer, but I do not want to have repeated information inserted into my BDM, can you help me? I am sending the link to the updated .BOS file

Many thanks for the help.

Link:

https://drive.google.com/file/d/0B8aMiLwwVY0nVXhPemhsQzh0MDA/view?usp=sharing

Hi
I saw your other post on the same topic.
I assume your are using API to fetch Data from your database.

Hence there should be two separate API returning data from BDM and the other database, variable1 and variable2 for example.
Now, I suggest create a page variable of type javascript.
You could refer to the database records by using the $data.variable1 and $data.variable2 .
Using a loop, you could compare the values.
In case of a unique value, add it to an array. (declare a new array type inside the script)
At the end of the loop, return the Array.
or you could use something like
bdm.setAttribte() = arrayValue

Regards

I put the link to my .BOS file updated in my last comment, would you be able to take a look at how it is now? I created another question here in the forum that explains better how my process is at the moment

Link to the question:

http://community.bonitasoft.com/questions-and-answers/how-compare-two-business-variables

I am a beginner in Bonitasoft, if you could analyze my new file would be great. If possible give a more detailed example of how to generate this page variable that you commented would be very good too

Thank you very much for your attention and patience so far.