How to define case sensitive object character property

Posted by mliu.mike on 03-Dec-2013 11:58

We have a data value object one of which is a CHARACTER data type like below.

We need to ensure that the returned CHARACTER is case sensitive.  Can I do that?

I tried different variations of the case-sensitive attribute but it does not look like it is there for define property.

define public property auditGUID as character no-undo
GET.
SET

All Replies

Posted by Peter Judge on 03-Dec-2013 12:45

The easiest way would be to use a private variable that you get/set from inside the property accessor and mutators. It's a little clunky but it'll work. Then, log a bug with Tech Support for the missing CASE-SENSITIVE modifier. Thismay be deliberate since in some cases it makes little or no sense to have that modifier on a property, especially if you add accessor (GET) and mutator (SET) overrides. What does case-sensitive mean in that case?

ie

DEFINE PRIVATE VARIABLE mcCaseSensitiveGuid AS CHARACTER CASE-SENSITIVE NO-UNDO.

DEFINE PUBLIC PROPERTY auditGUID AS CHARACTER NO-UNDO

 GET():

   RETURN mcCaseSensitiveGuid.

 END GET.

 SET(INPUT pcValue AS CHAR):

    mcCaseSensitiveGuid = pcValue.

 END SET.

hth,

-- peter

Posted by Thomas Mercer-Hursh on 03-Dec-2013 12:52

On the other hand, since many properties have null getters and setters ... why not allow that modifier?

Posted by mliu.mike on 03-Dec-2013 13:01

Works!

This thread is closed