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

Moderator: amosbatto

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.

I would like to set the country control in a grid to the country of the user using the process. I have the following trigger that runs before the dynaform:

$aUser = PMFInformationUser(@@USER_LOGGED);
@@Country = $aUser['country'];

Now I create a text control with the value of @@country in the dynaform where the grid variable is, and I try to set the control in the grid as follows:
Code: Select all
var grid=$("#branchGrid");
var rows=grid.getNumberRows();

for (var i=1; i <= rows; i++) 
  var sVal = $("#Country").getValue();
  grid.setValue(sVal, i, 2);
  alert(grid.getValue(i, 2));
This however does not set the control in the grid when running a case. Please could someone help. Also I would like this control to be set even when a new row is added.
Your @@Country variable has the two letter ISO code for a country, so the dropdown box to select the country needs to have the following SQL:
SELECT '', '--select--'

Then you can use this JavaScript code:
Code: Select all
var oGrid = $("#branchGrid");
var rows = oGrid.getNumberRows();
var usersCountry = $("#Country").getValue();

//set empty country dropdown in the grid rows when the Dynaform loads:
for (var i=1; i <= rows; i++) {
  var country = oGrid.getValue(i, 2);
  if (country == '') {
     oGrid.setValue(usersCountry, i, 2);

//set country when new rows are added:
oGrid.onAddRow( function(aNewRow, oGrid, rowIndex) {
  oGrid.setValue(usersCountry, i, 2);
No puedo acceder al diseñador por https.

Tengo el mismo problema. ¿Ha habido alguna[…]

I am trying to add custom font "Ubuntu-Medium[…]

Hi, I suggest you use the operator role with the[…]

Hello, Have you tried with this link: https://sou[…]