two grids of different forms to share information

I have a main form with a grid that has a button control that brings forth an administration form with a grid.

the administration form has an add button and fields used to insert data on the grid .

But now i want the information on the administration form grid to populate the information on the main form's grid once the administration form is closed.

Tagged:

Comments

  • Hi Veronica,

     

    you can add the following client side script code to the "On Form subisson" to send data to the main/initiating  form:

     

     

    var txtFieldValue = GetField("txtFieldName","");
    
    var txtReturnFieldOnMainForm = "txtReturnedValue";
    
    window.top.opener.SetField(txtReturnFieldOnMainForm, "", txtFieldValue);
    

     

    If you don't like to show the standard submit and cancel button on you admin form you can use the same code on a client side button instead.

     

    That should work for you.

     

    Best regards

    Sascha Cutura

     

  • Similar to this, it is possible to use the 'opener' reference to click a hidden button on the parent form to force the BPM form to refill the grid with updated data.  Sorry I don't have sample code at my fingertips at the moment.

  • ... or if the field you are filling is set to 'has dependants' the form will refresh itself.

  • hi jerome, thanks for taking time to answer, but but what i'm really looking for is to call a form using a button, this is a script i have but it keeps on givime errors
    var ParentID = GetField('txtInpFolderID','');
    var txtInpNCID = GetField('txtNCID','');
    var FullURL = 'eForm.aspx?Map=QualityAdministrationGroup&Client=External&Action=frmAddCauses&FilterParams=txtInpNCID;'+txtInpNCID+';Text:txtInpFolderID;'+ParentID +';Text';
    var retVal = window.showModalDialog(FullURL,window.self,'dialogHeight:550px;dialogWidth:750px;scrollbars:no;menubar:no;resizable:yes;toolbar:no;location:no;status:no');
    if(retVal != 'Added Stuff')
    {
    alert('The last item was not properly saved. Please make sure to use the save button');
    }
    document.getElementById('cmdRefreshGrid').click();

    this is placed on the "when button pressed"

  • What error message do you get?

     

    What happens when you paste the evaluated FullURL into the browser window? Does that work fine?

     

    Did you try to use the normal window.open instead window.showModal();

     

  • when i use the window.open , the form just hangs it does not open. when i paste the evaluated FullURL into the browser window there's an error message Store procedure 'esp_creation action' failed is indicated. when i try to call the form the second time, Failed to read attachement.

  • Below is an example which works fine to get the popup working:

     

    var Value1 = GetField("Value1","");

    var Value2 = GetField("Value2","");

    var Value3 = GetField("Value3","");

     

    var FullURL = '/Metastorm/eForm.aspx?Map=PopupDemo&Client=External&Action=PopupForm&FilterParams=Val3;' + Value3 + ';Text:Val1;' + Value1 +';Text:Val2;' + Value2 +';Text';

    window.open (FullURL,"_blank",'status=no,width=260,height=260,resizable=no,toolbar=no,location=no,menubar=no');