CalcBuilder Forum

result same value string text

User bsnline 2018-03-14 17:31:55


I have 2 string text

for example:

$mconsegna0=ABETONE # (FIELD INPUT)


if ('$mconsegna0'=='$keys0') $disa=10

why the result is 0 and not 10 ?

i want ... if "find the same value" result is = 10
suggestion please.

Moonsoft support 2018-03-15 08:55:49

per your question we can't see clearly which is the purpouse of your code, but we see you're comparing the 2 values 'names', as you're using quotes inside the 'if' expression (so '$mconsegna0' will never be equal to '$keys0'). As you will surely want to compare the two variables/values of $mconsegna0 and $keys0 you should write instead

if ($mconsegna0==$keys0)

Also including at your output ##mconsegna0## and ##keys0## will help you to check which are the real values being used and you can find out if there's any difference between them.

We also share a link to a tutorial about using matrix, in case it may help



Create dynamic calculators

Buy now!
Support/development 10 hours

Get a bigger amount of hours for more complex tasks and get a 10% discount

Buy now!