Don't show Please Select in DropDown lists

評論

2 條評論

  • Avatar
    Karl Makatenas

    I just ran into a similar issue, so I'm not sure if this will help your exact scenario.

    For one, you'll have to add the logic to loop through the repeating subform and check each item individually.  I also included another function I found useful even though it's not called.

     

    window.APNamespace = {};
    var APNamespace = window.APNamespace;

    APNamespace.clearDOM = function(node)
    {
      while (node.children.length > 0)
      {
        node.removeChild(node.lastChild);
      }
    };
    APNamespace.renderBlankDOM = function(node)
    {
      var option = document.createElement('option');
      option.value = '';
      node.appendChild(option);
    };
    APNamespace.selectDropdownOption = function(node, val)
    {
      for (var i = 0; i < node.options.length; ++i)
      {
        if (node.options[i].value === val)
        {
          node.options[i].selected = true;
          break;
        }
      }
      return node;
    };

    function ExecuteOnQueryComplete()
    {
      var node = document.getElementById('NodeInternalPathNameHere');
      APNamespace.clearDOM(node);
      APNamespace.renderBlankDOM(node);
    }

    0
    評論操作 永久連結
  • Avatar
    David Hill

    Thanks for your feedback Karl! I managed to do what I needed to do by adding in a Loop to go through the items in my repeating subform and used an Inline Function (@Replace(${/pd:AP/pd:processFields/pd:S0CompanyCode}, "-1", "")) to take out the '-1's. Also had to switch the Bulk SQL Update to individual SQL Inserts/Updates within the Loop. So now I have this process:

    0
    評論操作 永久連結

登入寫評論。