Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderators: ArturoRobles, ArturoRobles

Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
User avatar
By amosbatto
You can use control.executeQuery() to get a complete list of all the options for a suggest box, but you will have to filter them to eliminate the options you don't want.

If you a Dynaform with:
- a suggest box with the ID "selectUser", which has the SQL query:
- a grid with the ID "usersList", which has two fields:
- - textbox with the ID "userId"
- - textbox with the ID "username
- a button with the ID "fillGrid"

Add the following JavaScript to the DynaForm. When the "fillGrid" button is clicked, it adds all the options in the suggest box which match the current value in the suggest box.
Code: Select all
function populateGridFromSuggest() {
  var filter = $("#selectUser").getValue();
  var aOptions = getFieldById("selectUser").executeQuery();

  //clear the grid:
  var nRow = $("#usersList").getNumberRows()
  for (; nRow > 0; nRow--) {
  //repopulate the grid with the filtered options from the suggest box:
  for (var i in aOptions) {
    if (aOptions[i] != -1) {
      $("#usersList").addRow([{value: aOptions[i].value}, {value: aOptions[i].text}]);

Here is a example DynaForm:
(3.04 KiB) Downloaded 105 times
User avatar
By ashkufaraz
Thank you for replay
with this can get all option a suggest
Code: Select all
var aOptions = getFieldById("selectUser").executeQuery();
ok but
for suggest in grid how can do it?
This not worked
Code: Select all
var aOptions = getGridField("Grid",1,"selectUser").executeQuery();

Maybe try increasing your thread stack size? Seems[…]

I use PM 3.4. Android push works while IOS push do[…]

[quote=ziadeh post_id=823031 time=1550759948 user_[…]

I have to support reports in processmaker 3.4. A s[…]