These are the functions I have so far, but the word red will not convert to blue.
Custom Description - OnValidate()
//-- Validation for Custom Description
IF ("Custom Description" = UPPERCASE('RED')) THEN
fConvertCustomDescription("Custom Description", 'RED', 'BLUE');
IF ("Custom Description" = LOWERCASE('red')) THEN
fConvertCustomDescription("Custom Description", 'red', 'blue');
LOCAL fConvertCustomDescription(cDescription : Text[50];cRed : Text[50];cBlue : Text[50]) NewOutput : Text[50]
//-- fValidateCustomDescription
Pos := STRPOS(cDescription, cRed);
WHILE Pos > 0 DO //Original: WHILE Pos > 0 DO
BEGIN
cDescription := DELSTR(cDescription, Pos, STRLEN(cRed));
cDescription := INSSTR(cDescription, cBlue, Pos);
Pos := 0;
NewOutput := cDescription;
IF Pos = 0 THEN
EXIT(NewOutput);
END;
I tested it, it seems logically correct, but it won't convert the entered text red to blue.
0
Comments
Custom Description - OnValidate()
//-- Validation for Custom Description
IF ("Custom Description" = UPPERCASE('RED')) THEN
"Custom Description" := 'BLUE';
"God and developers are in a constant battle. Developments to make their applications more idiot-proof, and God to produce bigger idiots!"