hi ,
i have a table of 10 rows *10 columns populated from a database
i want to select a row from a table and get the data from this row .
i have looked into this http://community.bonitasoft.com/groups/french-corner/resolved-sélec…
they said that i can use a javascript code, can someone be more explicit ?
thank you
1 Like
I’m not a Bonita experienced user but I’m sure we can find a way if you explicit your question.
Is your table a widget in a pageform? You want select a row from the table widget or from a table in the database?
Regards
yes my table is a widget in the platform ,i want to select a row from the table widget
By “getting the data from this row”, I understand you want to store it in variables in your process. If so, can’t you get the data directly from the database??
I see what you’re actually struggling with. I actually am too.
The selected list actually returns only the content of the first column of a row, maybe it’s a bug ?
If you ever find a solution, can you please post it?
Regards.
yeah i think its impossible to do with the widget ,i saw in a different post that u can use javascript but i dont know how.
however u can use that first column of a row in a query to retrieve the others data of the row from the database
I actually found what I would call a semi-solution.
You can’t get the whole row in a list but you can get ONLY ONE field from the table.
Using “from column with index” option which is misplaced in my opinion, we tend to think it’s related to the List of initial values. See the image below.
You put the column index which data you want to get and you can use the following script (in the image it’s called getNumPolice) to store the data.
return field_Table1.get(0);
Note: The return type is a String. field_Table1 is a list of ONE String object.
Hope this helps,
Regards.
yes and u can use that numero_police to retrieve all the data from the row with a query like "select * from db where id_police =numero_police
Exactly, it’s not very “pratique” but whatever
i guess we’ll have to deal with it ,thank you