IT Process Automation

 View Only
  • 1.  populating table IRF

    Posted May 03, 2016 10:06 AM

    Hi guys

    I have trouble to preloading records to IRF table. I like doing this by FORM DATA INITIALIZATION CODE, but can’t get success to this way.


    I was reading some articles and documentation but don’t get success:


    The only way to get is by SCRIPT section IRF inside, configuring ONLOAD event to call the fill table function too. However, this way can’t provide the record values in dynamic way and the values was provide in hard code.


    My question is:

    If possible by FORM DATA INITIALIZATION CODE provide the records values to fill IRF table, or; specify the parameters to ONLOAD event?

    In other words: building ONLOAD event function by FORM DATA INITIALIZATION CODE.


    Thank you in advance

  • 2.  Re: populating table IRF

    Posted May 05, 2016 10:31 AM

    Hi guys,

    Some idea or suggestion about how to populating or pre-loading records into an IRF table from "FORM DATA INITIALIZATION CODE" ?


    Best regards

  • 3.  Re: populating table IRF

    Posted May 05, 2016 10:50 AM

    I'm not sure what data do you need to display in your table but you can use "FORM DATA INITIALIZATION CODE" for pre-loading  some values to standard text fields. Then define in IRF some JavaScript  that can select data from SQL database. To get correct set of data use your pre-loading  values for building condition for the SQL query.

  • 4.  Re: populating table IRF
    Best Answer

    Broadcom Employee
    Posted May 05, 2016 11:00 AM

    I recently had to do something similar.  What I did was to create the table and another, hidden field on the IRF.  In the process that called the IRF, I converted my data to a JSON object,  and converted the JSON object to a string with the "stringifyJSON" function.  In the form data initialization code, I assign the JSON string to the hidden field.


    Finally, in the IRF Script section, I created this function:


      load_table: function() {

        grc_json = ca_pam_convertJSONToJSObject(ca_pam_getTextFieldValue('Form.grc_data_json'));

       ca_pam_setTableDataFromJSObject('Form.grc_updates', grc_json);




    The IRF's onLoad trigger calls this function.