cancel
Showing results for 
Search instead for 
Did you mean: 

Data Collection Formula - compare text values

Former Member
0 Kudos

I have two data collection parameters I want to compare. In each data collection parameter I want to scan in an alpha-numeric value, and I'd like to use the formula to determine if those two values are the same.

Something like this...

a=PARAM1;


b=PARAM2;

 

if (a=b) {c=0};

else {c=1};

exit(c);

Is it possible to use the data collection formula functionality to compare two text fields or will it only compare two numeric values?  Is it valid to use an if statement in data collection formula (the help only mentions mathematical equations)?

Accepted Solutions (0)

Answers (3)

Answers (3)

MiguelSanchez
Explorer
0 Kudos

Hi Alli,

Sergiy is right. Formula scripts can handle only numeric values.

Best Regards,

Miguel

sergiy_katerinich
Active Contributor
0 Kudos

From my experience, it operates on numeric values only.

0 Kudos

Hello Alli,

'If' statement should be allowed. I think you should be able to compare strings too using Java Script.

Please, update us on your results.

Br, Alex.