hi this is xyz

hi dear please give me solution regards this …

i am a new comer in ax…

public void modifiedField(fieldId _fieldId)
{
//SubjectsTable subjectsTable = subjectsTable.Total;
str a;
;
switch(_fieldId)
{
case fieldnum(subjectsTable, English):
case fieldnum(subjectsTable, Hindi):
case fieldnum(subjectsTable, Maths):
case fieldnum(subjectsTable, Civics):

this.Total = this.English+ this.Hindi+ this.Maths+ this.Civics;

this.Total = a;

b = this.Total / 4;

this.

}
super(_fieldId);
}

public void modifiedField(fieldId _fieldId)
{
int a,b; // int a sotred value and b is str please solve the below code by summing fields.
;
switch(_fieldId)
{
case fieldnum(Student_EduCopy, Subject1):
case fieldnum(Student_EduCopy, Subject2):
case fieldnum(Student_EduCopy, Subject3):

a = this.Subject1 + this.Subject2 + this.Subject3;
this.Total = a;

b = a/3;
this.Percent = b;

break;

default:
super(_fieldId);
}

}

Ask your question clearly…

is this ur trying to add the int and str values is it right?

use the global function

{
int a=10,c;
str b=“5”;
;
c=a+Global::str2int(b);
info(strfmt(“added value is:%1”,c);
}

Shaik,

Plz make clear what is the issue you are facing?

Acctually my leader was given a small project

student and subject

i created 2 tables as like ,ok my question is i wana show u when i given marks in contain subjects on that time total field should be hire.

so that i was adding but giving error…

public void modifiedField(fieldId _fieldId)
{
//SubjectsTable subjectsTable = subjectsTable.Total;
str a;
;
switch(_fieldId)
{
case fieldnum(subjectsTable, English):
case fieldnum(subjectsTable, Hindi):
case fieldnum(subjectsTable, Maths):
case fieldnum(subjectsTable, Civics):

a = this.English+ this.Hindi+ this.Maths+ this.Civics;

this.Total = a;

b = this.Total / 4;

this.percentage = b;

default ;

break;

}
super(_fieldId);
}

plz ans me dear…

can u pls mention that error?

Shaik,

Do you want to get total of marks in all 4 subjects? Is this what u want? What else you require you write clearly, i ll send you the code.

Trish!

operands types are not comaptable with the operator.

yes u got my question dear…

public void modifiedField(fieldId _fieldId)
{

StudentTable studentTable;

real a,b;
;
switch(_fieldId)
{
case fieldnum(subjectsTable, English):
case fieldnum(subjectsTable, Hindi):
case fieldnum(subjectsTable, Maths):
case fieldnum(subjectsTable, Civics):

a = studentTable**.English+** studentTable**.Hindi+** studentTable**.Maths+** studentTable**.Civics;**

studentTable**.Total = a;**

b = studentTable**.Total / 4;**

studentTable**.percentage = b;**

default ;

break;

}
super(_fieldId);
}

Work with his code.

Along with this you have to change you switch case also, as per i am concern. Tell me on what condition you have used this switch case?

Trish!

same error dear …

just i wanna add the subject fields and getting total as well as percentage in the form node.

just i wanna complete the modified field that’s it please dear.

hi i wanna give marks in that subjects fields on that time total and percentage will auomatically hire.

plz send me code…

Shaik,

Forget every thing. goto table > override modifiedField() > paste this code

public void modifiedField(FieldId _fieldId)

{

this.Total = this.English + this.Maths;

this.Percentage = this.total/2;

super(_fieldId);

}

you are done. as soon as u ll enter the values in subjects you will get the total and percentage. No need of switch-case my friend.

Happy!

Trish!

ok i wll try dear but must using modified field()

hello shaik

while inserting onwards you wanna to calculate means just write this same coding in insert method of table

table->methods->overide->insert
then you can get that value

public void insert()

{

this.Total = this.English + this.Maths;

this.Percentage = this.total/2;

super();

}

shaik your error

i think you created one of ur field is string

check whether your created all the fields as interger

you cannot calcualte like this

string=string+integer;//so check your table

yeh i got same thought dear waw i got it just now thanks for co - opration dear but quickly response dear next time

thanks love u