Forum Discussion

trajmo's avatar
trajmo
Occasional Contributor
6 years ago

Format for numeric value

Hello, I am trying to specify a property checkpoint for my fild which contains numbers, to check the format, in the code of my desktop application in Delphi is specified #,##0.00, how can i do it w...
  • tristaanogre's avatar
    tristaanogre
    6 years ago

    Now it's clear... so, you're simply wanting to make sure that the contents of the property match a particular format.

    So...  When setting up your property checkpoint, one of the options in the "Condition" parameter is "cmpMatches".  When you select that, then in the "Value" parameter, you enter the regular expression for the format you want as a "String", not a code expression.

  • tristaanogre's avatar
    tristaanogre
    6 years ago

    In the blank space in the value field I believe should be the regular expression for the format that you're wanting to check... and yes, it is a "number" techincally, but the wText field in the object is a string property.

    You MAY end up not being able to use the built in property check point but might need to write a script routine that you call from within your keyword test to do the validation/check of the contents.  Again, regular expressions are going to be your friend here.