Tag Archives: Query Messages

Central Designer: Constants and Their Role in Query Messages

What are Constants?

Constants are that item whose value remains same during the execution of the program from the beginning till the end of a program


  • Reusable
  • Integer range checks
  • The value of an item is constant for every subject in a study (i.e lower and upper pulse or height or temperature ranges)
  • It can be referenced in a query message when performing an action
  • Useful when accessing by several forms/checks
constant ranges (min and max value)

Let’s visualize this using a programming language. Define your constant(s). Do some calculation and output the results. Your constant never changes. Only what variables, what the user input into the screen, changes.

/* Define a constant to convert from pounds to grams */
5:  #define GRAMS_PER_POUND 454
/* Declare the needed variables */
11: long weight_in_grams, weight_in_pounds;
/* Perform conversions */
25:    weight_in_grams = weight_in_pounds * GRAMS_PER_POUND;
/* Display results on the screen */
Enter your weight in pounds: 182
Your weight in grams = 82628

A couple of points to remember when using constants:

  • drag the constant into the parameters and then drag the parameter into the message box
  • change the prefix from ‘this.’ to ‘constants.’. This will prevent from getting an error message when you check the syntax (i.e. syntax error)

Conclusion: When the parameters change, you only need to change it at the Constant (tab) study object level and avoid hard-coding each query text message. The actual value of the constant needs to be entered only once, when it is first defined.

Reference: Central Designer Best Practices

Your comments and questions are valued and encouraged.
Anayansi Gamboa has an extensive background in clinical data management as well as experience with different EDC systems including Oracle InForm, InForm Architect, Central Designer, CIS, Clintrial, Medidata Rave, Central Coding, OpenClinica, Open Source and Oracle Clinical.