Quantcast
Channel: PTC Community: Message List - Windchill
Viewing all articles
Browse latest Browse all 8876

Re: How to put user picker in table builder

$
0
0

I created a callback function in a .js file that is included in the .jsp for the action.

 

function userPickerCallback(objects, pickerID, attr, displayFieldId) {

   var pickedObjs = objects.pickedObject;

   if (pickedObjs != null) {

      var updateHiddenField = document.getElementsByName(pickerID)[0];

      var updateDisplayField;

      var fields = document.getElementsByTagName("input");

      for (p=0;p<fields.length; p++) {

        var currInput = fields[p];

        if (currInput.name.indexOf("userPickerId")>-1

                && currInput.name.indexOf("textbox___old")<0) {

               updateDisplayField = currInput;

        }

      }

     

      for (var i = 0; i < pickedObjs.length; i++) {

         if (pickedObjs[i] != null) {

            var userOid = pickedObjs[i].oid;

            var displayAttr = eval("pickedObjs[i].fullName");

            updateHiddenField.value=userOid;

            updateDisplayField.value=displayAttr;

         }

      }

   }

 

}


Viewing all articles
Browse latest Browse all 8876

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>