Page 2 of 2

Re: Subform Type Form

Posted: Fri Apr 24, 2015 6:44 am
by admin
Ben,

There is no easy way.

If you only have one record, I'm not sure why you're using a subform. If this extra info needs to be kept in another record, you could put those fields on the main Form and update them on After Save.

Subforms are really for one to many relationships.

Steven

Re: Subform Type Form

Posted: Fri Apr 24, 2015 7:51 am
by admin
Ben,

You could try this in the JavaScript as the Form loads..

Code: Select all


var i = 'subform_name';

document.getElementById(i + '_subform0000_nuRow').setAttribute('onclick','')

Steve

Re: Subform Type Form

Posted: Fri Apr 24, 2015 5:59 pm
by BenFranske
admin wrote:Subforms are really for one to many relationships.
Oh I realize that. In this case it's because the data in the subform will (in most but not all) cases entered automatically through a batch process which may occur before and may occur after the manual data entry takes place. I didn't want to place the fields in the main table because if the automatic batch job occurs before the manual data entry they would need to edit an existing record instead of creating a new one. In other words they would have to search through the records and determine if the batch job has already created a record to edit or if they should make a new record.

Re: Subform Type Form

Posted: Fri Apr 24, 2015 7:42 pm
by admin
Ben,

Let me know if the function above does what you want, and I'll close this post

Steven

Re: Subform Type Form

Posted: Sat Apr 25, 2015 3:25 am
by BenFranske
You were very close and put me on the right trail to dig around further but instead of:

Code: Select all

var i = 'subform_name';

document.getElementById(i + '_subform0000_nuRow').setAttribute('onclick','')
I needed to make it:

Code: Select all

var i = 'msm_operations_sales';
document.getElementById(i + '_subform0000_nuRow').setAttribute('onclick','');
document.getElementById(i + '_subform0000_nuRow').setAttribute('onkeypress','');
Note that this did break the actual saving of data from the subform though so I still need to dig around some more.

Re: Subform Type Form

Posted: Tue Apr 28, 2015 1:23 am
by admin
.