Comparing two fields with the same values

Hi all,

In Servoy I have two forms “FormABC and FormABC_Compare”.Each form has a field with Data type Char and length 9 “ABC_Respondent” in FormABC and “ABC_Respondent” in FormABC_Compare".
In Servoy I have two forms FormABC and FormABC_Compare. Each form has a field with Data type Char and length 9 “ABC_Respondent” in FormABC and “ABC_Respondent” in FormABC_Compare".

What I’m trying to do is to compare these two fields against each other with the same values that user enter.
The two fields are set in Servoy form as Combobox “Pull down Menu”.

I use the following script to compare the two Fields:

if (FieldA != FieldB)
{
message += ‘Two fields do not match.\n’;
}

else {
return ;
}

What happens is in 50% time or more I get error “Two fields do not match”.
I know that the two field’s values are the same, but I still get the above error.

Can anyone please let me know why I get the above error?

Thanks in advance.

Abrahim

we don’t have enough information to say what is wrong at youre place..

for example the message is concatted with it self.. So don’t you see the portion of the previous time you did the compare? Is the message a internal variable of the script?

besides that do a application.output!

application.output(“'” + fieldA +“‘=’” + fieldB +“'”);

then you will see it for youreself.