Hi guys!!
I'm using a G315 HMI from RedLion to change an internal String tag via Data Entry, and I would like to add this tag to a Log file (.CSV). The problem I see is that I have a script that will order the data by separating the fields by looking for commas ','. I believe this will cause conflict if the user entered any commas in the entry keypad.
The question is, Is there any way to reject a data entry via the Validate option on the Entry of the Data Box if the user entered any commas? Or can I limit the user's entry pad to only use letters, numbers and spaces (and no use of symbols)?
I'm currently trying this code, but it doesn't seem to work:
Thanks in advance for your time!!
I'm using a G315 HMI from RedLion to change an internal String tag via Data Entry, and I would like to add this tag to a Log file (.CSV). The problem I see is that I have a script that will order the data by separating the fields by looking for commas ','. I believe this will cause conflict if the user entered any commas in the entry keypad.
The question is, Is there any way to reject a data entry via the Validate option on the Entry of the Data Box if the user entered any commas? Or can I limit the user's entry pad to only use letters, numbers and spaces (and no use of symbols)?
I'm currently trying this code, but it doesn't seem to work:
Code:
int i;
for(i = 0; i < Len(Data); i++) {
if(Data[i] == 44) {
return false;
break;
}
}
return true;
Thanks in advance for your time!!
Last edited: