on 03-18-2011 8:27 AM
Hi Guru,
i am new in sap interactive form. I have a probleme i need to count the number of field. my scenario is offline. The event handler ist the Drapdown list(+,-) . Wenn i choose + , 10 time then the status ok field most be 10 in the subform 2 . Could somebody help me please.
I will be appreciate.
Thanks in advance.
Regards , Ombessa.
Hi Mate,
sorry I couldn't get your requirement, can you please explain it more clear,
Thanks,
Sai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi sai,
thanks for your input. My scenario is offline and i need to count a number of field in the table. The event handler is the dropdownlist. to trigger the scenario i choise + or - in the dropdown list. When i choise +, that mean that the car is ok and - the car isn't ok. in the another table i have a field with status ok and nicht ok for the cars. I need to know how many car are ok or not ok and i must count and saving that as total in another subform. All those change suppose to do with js.
Thanks in advance.
Regards
Hi,
I hope this will helpful for you
var numField = this.rawValue;
var count = xfa.form.order.page1.flowedSubform.positionedSubform.all.length
var t;
var r=0;
if(count > 1){
for(t = 0; t < count-1; t++){
xfa.form.order.page1.flowedSubform.positionedSubform.instanceManager.removeInstance(1);
}
}
for(t = 0; t<=numField -2; t++){
xfa.form.order.page1.flowedSubform.positionedSubform.instanceManager.addInstance(1);
}
Thanks
Hi Chanshini,
thanks for the input. But i need to count the field not the page. i have this code what did you mean about.
thank.
function checklist(){
if ((carId.rawValue != 0) && (status.rawValue == "(+)"))
{
then ((this.record.carpgroup1[].GRPnr1) == (this.record.cargroup2.DATA[].GRPnr2))&&
((this.record.car2group[].GRPnr2)== this.record.car3group[].GRPnr3))
for (var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount++) {
nSum += oFields.item(nNodeCount).rawValue;
}
amount.rawValue = nSum;
hi,
I couldn't understand your code..
but his is how it should be...
//dropdown: change event.
if(carId.rawValue != 0 && status.rawValue == "+"){
var okCount = 0;
var nokCount = 0;
for(var i=0;i<table1.nodes.length-1;i++){
if(xfa.resolveNode("table.datarow["+i+"].statusfield").rawValue == "OK")
okCount++;
else
nokCount++;
}
form1.subform1.nokCars.rawValue = nokCount;
form1.subform1.okCars.rawValue = okCount;
}
of course the code depends on your form structure and should include any validations as such, but in a simple way to explain this is how I do. hope this helps you.
Cheers,
Sai
Hi Guru
i have problem with my js code. my scenario is offline interactiv form. I need to have the node of my it. But i receive only 0 as result not the data row. Please could do help me ?
my js code.
var rowIndex = this.parent.index;
xfa.host.messageBox("Index: " + rowIndex);
var theFields = xfa.resolveNodes("xfa.myMainPage.mySubForm.myTable.myRow.DATA[*].idNR");
var aString = "";
var aString = aString + xfa.resolveNode("myMainPage.mySubForm.myTable.myRow["rowIndex"].idnr").rawValue;
var i = 0;
aString = aString + theFields.item(i).rawValue;
xfa.host.messageBox("Wert: " + aString);
var rowIndex = this.parent.index;
xfa.host.messageBox("Index: " + rowIndex);
Thanks in advance.
Regards, ombessa
Edited by: ombessa on Mar 24, 2011 6:22 PM
Edited by: ombessa on Mar 24, 2011 6:23 PM
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.