spacer
cornerspacercorner
Reply
Occasional Contributor
veronica
Posts: 8
Registered: 02-15-2012
0 Kudos

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.

Employee
S Cutura
Posts: 21
Registered: 11-07-2011
0 Kudos

Re: two grids of different forms to share information

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

 

Advisor
Robert Vignerot
Posts: 38
Registered: 11-15-2011
0 Kudos

Re: two grids of different forms to share information

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.

Esteemed Contributor
Jerome҉
Posts: 744
Registered: 05-18-2010
0 Kudos

Re: two grids of different forms to share information

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

Occasional Contributor
veronica
Posts: 8
Registered: 02-15-2012
0 Kudos

Re: two grids of different forms to share information

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"
Employee
S Cutura
Posts: 21
Registered: 11-07-2011
0 Kudos

Re: two grids of different forms to share information

[ Edited ]

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();

 

Occasional Contributor
veronica
Posts: 8
Registered: 02-15-2012
0 Kudos

Re: two grids of different forms to share information

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.
Employee
S Cutura
Posts: 21
Registered: 11-07-2011
0 Kudos

Re: two grids of different forms to share information

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');

Esteemed Contributor
Jerome҉
Posts: 744
Registered: 05-18-2010
0 Kudos

Re: two grids of different forms to share information

line spacer line
spacerFollow Metastorm on:
spacer Twitter YouTube Blog iTunes LinkedIn Metastorm Community Central, MC2
spacer Copyright © 2011 OpenText Corporation. All Rights Reserved.spacer About Metastormspacer Privacyspacer Legalspacer Site Mapspacer RSSspacer Contact Us
Microsoft Gold Certified Partner
Powered by Windows Azure
line spacer line