Forum Discussion

jyothinb's avatar
jyothinb
Contributor
10 years ago

How to create a property checkpoint for hard code value & a variable

Hi, I am trying to create a property checkpoint for a 'WndCaption' property. Value should always match to "Last Visit 9/10/2015 (0 days ago)". Here date value may change and even the number 0 may cha...
  • Marsha_R's avatar
    10 years ago

    the string you want to use as a baseline will look something like this:

     

    "Last Visit " + aqDateTime.Today() + " (" + myvariablefornumberofdays + " days ago)"

     

    Instead of using a Property Checkpoint, build your own with an If Then.  See attached screenshot.

     

     

  • HKosova's avatar
    10 years ago

    What Marsha_R said, but with two notes:

     

    1) You may need to format the date using aqConvert.DateTimeToStr or aqConvert.DateTimeToFormatStr.


    2) No need for If...Then -- you can use variables in checkpoints directly. First, create a checkpoint with the hard-coded value first. Then click the checkpoint's Value string, press F2 and replace the hard-coded value with a variable.

     

    property-checkpoint-with-variable.png