on 08-06-2009 8:16 PM
Hi ,
I need to add 2 column values in an interactive form after user-inputs.
I am planning to code it via javascript.
If i am in 3rd column how do i get the values of 1st and 2dn column.
I have a subform which holds these values with binding $record.MANUAL_NODE.DATA[]*
I tried
this.rawvalue == xfa.record.Material_node.data.RELW1.value + xfa.record.Material_node.data.RELW2.value ;
in calculate event of 3rd column but it is not doing addition.
I also tried resolvenode as it is a table structure.
this.rawvalue ==
xfa.resolveNode("xfa.data.Material_node.Data[" + this.parent.index + "].relw1").value +
xfa.resolveNode("xfa.data.Material_node.Data[" + this.parent.index + "].relw2").value
Where am i going wrong?
Rgds
Vara
Edited by: Vara K on Aug 6, 2009 9:27 PM
Hi Vara,
You can write the following JavaScript code in the Form ready event of the DATA subform:
this.thirdColumn.rawValue = this.firstColumn.rawValue + this.secondColumn.rawValue ;
Hope this helps,
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Amit,
I need sum after user entry in the columns 1 & Column 2 of the form.
does Form ready works before display form itself? still i tried this in form ready ..
this.MATERIAL_NODE.DATA.DIFFQ.rawValue = this.MATERIAL_NODE.DATA.RELW1.rawValue + this.MATERIAL_NODE.DATA.RELW2.rawValue
it just brought 0 .
I tried this in click event of the form for that 3rd column it only works for first column
this.MATERIAL_NODE.DATA.DIFFQ.rawValue = this.MATERIAL_NODE.DATA.RELW1.rawValue + this.MATERIAL_NODE.DATA.RELW2.rawValue
How can make it to work for all remaining rows?
Rgds
vara
Edited by: Vara K on Aug 6, 2009 9:46 PM
Amit,
Could you please paste it again without hyperlink display?
I cannot see it properly..Do we have htttp inside?
"this.MATERIAL_NODE.DATAhttp://\"this.parent.index\".RELW2").
I tried diaply as code.. it doesn't work on exit event.. of the field..
this.MATERIAL_NODE.DATA.USRMO.rawValue = xfa.resolvenode( "this.MATERIAL_NODE.DATA[" + this.parent.index + "].RELW1").rawValue + xfa.resolvenode( "this.MATERIAL_NODE.DATA[" + this.parent.index + "].RELW2").rawValue
Rgds
Vara
Edited by: Vara K on Aug 6, 2009 10:22 PM
Can you tell me the Hierarchy of the form,
Where your fields are.
Is it
BodyPage
MATERIAL_NODE
DATA
RELW1
RELW2
USRM0
Then you have to write:
BodyPage.MATERIAL_NODE.DATA.USRMO.rawValue = xfa.resolvenode( "BodyPage.MATERIAL_NODE.DATA[" + this.parent.index + "].RELW1").rawValue + xfa.resolvenode( "BodyPage.MATERIAL_NODE.DATA[" + this.parent.index + "].RELW2").rawValue;
xfa.resolvenode( "Bodypage.MaterialForm.HeaderForm.ItemForm["this.parent.index"].Tcolumn").rawValue
= xfa.resolvenode( "Bodypage.MaterialForm.HeaderForm.ItemForm["this.parent.index"].Fcolumn").rawValue +
xfa.resolvenode( "Bodypage.MaterialForm.HeaderForm.ItemForm["this.parent.index"].Scolumn").rawValue ;
If this doesn't work send me the form on amit.pceatgmail.com
I have resolved it through button and it was a binding issue in form.
rgds
Vara
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.