IT Process Automation

  • 1.  Retrieve dataset value in SRF

    Broadcom Employee
    Posted Nov 14, 2017 07:18 PM

    I can populate a select list and input data in tables using data in a dataset when the values are in stored in an array. My issue is how do I retrieve a single value and populate that in a text field?



  • 2.  Re: Retrieve dataset value in SRF
    Best Answer

    Broadcom Employee
    Posted Nov 15, 2017 09:32 AM

    You will need the expression representing the value in the dataset that you are trying to assign.  If you open the dataset and find the value, you can right click that value and select "View Expression" to see the expression that represents that value.  Then you can use that expression in the ca_pam_getDatasetData function to load the default value into the text field in the SRF.  



  • 3.  Re: Retrieve dataset value in SRF

    Broadcom Employee
    Posted Nov 17, 2017 04:43 PM

    Can you show me what I'm doing wrong? I've worked with datasets plenty using processes but not with SRF functions.

     

    The results that get put into the text field is "com.ca.pam.client.bean.C2OStringDTO@52e" but the actual value is in the dataset is "7".

     

    populateVCname: function()
    {

    var callBack = new Object();
    callBack.onSuccess = function(result)
    {
    ca_pam_setTextFieldValue('Form.vCenter',result)
    }

    callBack.onFailure = function(except)
    {
    alert('Exception in populateVCname function: '+ except); //display error message
    }
    var dataset = 'Datasets["/DoD_Dataset"].NutanixDCs[0].vCenterLocationID'
    ca_pam_getDatasetData(dataset, callBack);
    },