I need to calculate 3 numeric fields and have a "A" at the 4th textField.
example numericField1=40 numericField2=40 numericField3=20 and numericfield4 is the sum of 1, 2 and 3 so the total is =100 on numericfield4
if this total is 100 then the letter A has to be the value of TextField1
I did it this way on calculate - javascript
if (numericField3 > 90 && numericField3 <100) {
(TextField4 = "A");
}
Well somthing like that and work.
What I need and I have no Idea how to do it, is to have a more results(letter) like if the sum is between 70 and 89 the letter is B and if is between 50 and 69 the letter is C.
but also if numerifield1= to 35 then even if the total is between 90 and 100 the Letter change to B
here is why: NumericField1 corresponds to COLOR. NumericField2 corresponds to DEFECT. NumericField3 corresponds to CARACTER and NumericField4 corresponds to the total puntiation. if the puntuation is between 90 and 100 is a GRADE A product
but if the puntuation is between 90 and 100 but the NumericField1 is = to 35 then the result even is between 90 and 100 must be a letter B (or grade B)
I don't know if I did it clear. hope so and hope some one can help me.
Thank You
Solved! Go to Solution.
Views
Replies
Total Likes
I think I understand.
//form1.page1.subform1.grade_::calculate - (JavaScript, client)
if (!(form1.page1.subform1.total_.rawValue == "" || form1.page1.subform1.total_.isNull)) {
var n_ = form1.page1.subform1.total_.rawValue;
if (form1.page1.subform1.color_.rawValue == 35) {
this.rawValue = "B";
}
else {
if (n_ > 89) {
this.rawValue = "A";
}
else {
if (n_ > 69) {
this.rawValue = "B";
}
else {
if (n_ > 49) {
this.rawValue = "C";
}
else {
this.rawValue = "";
}
}
}
}
}
Steve
Views
Replies
Total Likes
I think I understand.
//form1.page1.subform1.grade_::calculate - (JavaScript, client)
if (!(form1.page1.subform1.total_.rawValue == "" || form1.page1.subform1.total_.isNull)) {
var n_ = form1.page1.subform1.total_.rawValue;
if (form1.page1.subform1.color_.rawValue == 35) {
this.rawValue = "B";
}
else {
if (n_ > 89) {
this.rawValue = "A";
}
else {
if (n_ > 69) {
this.rawValue = "B";
}
else {
if (n_ > 49) {
this.rawValue = "C";
}
else {
this.rawValue = "";
}
}
}
}
}
Steve
Views
Replies
Total Likes
YOU ARE THE MAN. Thank you. It works perfect.
Thank you
Dank
Grazie
Obrigado
Merci
Views
Replies
Total Likes
what if I need a value range colo_ field?
is this ok
//form1.page1.subform1.grade_::calculate - (JavaScript, client)
if (!(form1.page1.subform1.total_.rawValue == "" || form1.page1.subform1.total_.isNull)) {
var n_ = form1.page1.subform1.total_.rawValue;
if (form1.page1.subform1.color_ .rawValue > 32 && color_.rawValue < 35) {
this.rawValue = "B";
}
else {
if (n_ > 89) {
this.rawValue = "A";
}
else {
if (n_ > 69) {
this.rawValue = "B";
}
else {
if (n_ > 49) {
this.rawValue = "C";
}
else {
this.rawValue = "";
}
}
}
}
}
Also need this for defect_ and character_
Views
Replies
Total Likes
Please need help also for character and defect.
same as the one in color but in the same script.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies