I want to display my values in a table format in UI design. In UI I have the option as table widget but i am not understanding how to give the values to display. Please send me the solution .
Thank you
I want to display my values in a table format in UI design. In UI I have the option as table widget but i am not understanding how to give the values to display. Please send me the solution .
Thank you
I created an example for Bonita BPM 7.1.0.
Basically you need a variable with an array of key value map. You will use that variable to define table “Content” (make sure you click on the “fx” button to bind the variable and not the actual variable name). Each item of the array will lead to the creation of one row.
In the “Column keys” property of the table widget, type a comma separated list of key names.
In the “Headers” property define the name of column as they should be displayed at the top of the table (comma separated list).
Also remember to define another variable (text or JSON) and bind it to the “Selected row” property.
You might also want to take a look on documentation about UI designer widgets .
I know this thread is old, but I have the same question with version 7.3. I originally built my process from the tutorial and modified it for my process. When I failed getting the data into the table widget, I followed the example and steps submitted by Antoine, and it works fine using data from the API for the users when I create it on it’s own form in the UI designer. But when I add the users table to the existing form that I’m trying to make my app home page or try to build a table using data from my BDM, all I ever get is a blank table. I expect I must be doing something simple wrong, but I’m a complete noob.
I’ve tried …/API/bdm/businessData/com.gft.model.BuildList?q=findByUserId&p=0&c=10&f=userId and …/API/bdm/businessData/com.gft.model.BuildList as the variable value (variable name is myBuildList)
Here’s how I set properties:
And here’s the BDM:
Not sure what other information you might need to assist.
Appreciate any assistance.
Hi,
First step is probably to make sure that the REST API call is successful.
Assuming that you can access Bonita BPM Portal at http://localhost:8080/bonita, you can try to call http://localhost:8080/bonita/API/bdm/businessData/com.gft.model.BuildList?q=findByUserId&p=0&c=10&f=userId
If you enable the web browser developer tools, you should have details about what happen in the “network” tab.
Note that in your URL you have f=userId, so I assume you want to filter with a specific userId. So you must provide it, e.g.: http://localhost:8080/bonita/API/bdm/businessData/com.gft.model.BuildList?q=findByUserId&p=0&c=10&f=userId=123
Thank you for your quick response!
Well, that explains a bit.
When I add a real userId to the query parameter as you suggested (http://localhost:8080/bonita/API/bdm/businessData/com.gft.model.BuildList?q=findByUserId&p=0&c=10&f=userId=33), I get results in my browser.
I don’t get any results in the table widget when I update the API call to the same as what I did in the browser: …/API/bdm/businessData/com.gft.model.BuildList?q=findByUserId&p=0&c=10&f=userId=33
I changed the query to ‘find’ instead of ‘findbyUserId’ to hopefully display all the records, and again it works in the browser but not in the widget (Changed the count to 100 after puzzling over why I only saw some of the oldest test records I entered)
One thing I noticed. When I work thru the process, it takes the data I enter from my instantiation form and puts it in the user’s queue in the Portal. In there, the next form in the next human task displays and I can update it and it completes the process successfully. I can see the process in the portal as completed (I don’t see any of the old ones, so the user sees no history of what they’ve done, which I think is weird).
The page I am working on is the home page of the app, and not directly involved in the process.
So, it seems the API call is working, just not in the widget for some reason.
I appreciate your assistance. Please let me know if there is any other information I can provide that might be helpful.
Thanks.
Can you export your process, forms… as .bos file (“Export…” button in the Studio) and share it for example using Dropbox or Google Drive?
Here it is in all of it’s noobish splendor!
https://dl.dropboxusercontent.com/u/27674054/GFT-Build-Process-1.0.bos
My ultimate goal is to replace the instantiation form with an import from XML function for current orders as well as a web hook from my ecommerce site for the new orders. I’m barely out of the gates.
Thanks for your assistance with this.
The issue is in the way you associate the users
variables with the table widget “content” property. You need first to click on the “fx” icon on the right of the “content” property and then enter the name of the variable.
If you don’t click on this “fx” icon you are actually defining a constant value.
You can learn more about this setting in UI Designer help menu (? icon on top right) and go in “Properties”.
Fantastic. This as well as the API call assistance from earlier has got the data displaying. I realized that in my flail of trying things, I created a new variable with a slightly different API call, which wasn’t correct but was assigned to the widget. That is why the data still wasn’t showing after we corrected the API call in the original variable.
Still have a couple issues before I can move forward with the rest of my process. I’m not having much luck searching the forums, so I’m wondering if I should open new threads for these individual questions since I don’t think they add value to this thread for others to search on. Let me know if you think that’s the route I should go and I’ll break these out into their own topics.
First, the date field shows up a day behind. I use the Today button and it’s correct in the form, but displays yesterday in the table widget. Same thing if I choose another date in the date picker. Looks related to the Time Zone, since if I change it to UTC on my PC, it’s correct
I am also having trouble getting the o parameter to work in the API call, in order to sort the records by a column or two. Perhaps I need to do that in the query?
Finally, I can’t get the ‘Start New Order’ button to work. I found some other threads regarding this (http://community.bonitasoft.com/questions-and-answers/getting-started-tutorial-submit-button-doesnt-work-portal-view-mode), but none of those solutions worked (Or I fudged them somehow). Could this be because I messed with the BDM when I tried out a new query? Do I need to rebuild my contracts?
Thanks for all your help!
If you can open new thread for each of the topics I’ll answer individually to each of them. Thanks.
Will do. Thanks!!