Note: Text below originates from the REDCap Help & FAQ text:
Action Tags are special terms that begin with the '@' sign that can be placed inside a field's Field Annotation. Each action tag has a corresponding action that is performed for the field when displayed on data entry forms and survey pages. Such actions may include hiding or disabling a given field (either on a survey, data entry form, or both).
There is a comprehensive list of all available action tags that you may use within the Online Designer "Edit Field" pop up box. You can use as many as you want for a single field, but if you do use more than one tag for a field, make sure to put a space or line break between them. Because the action tags are used as part of the Field Annotation, they are not displayed anywhere on the page. For example, if you put @HIDDEN-SURVEY in a field's Field Annotation text box, then the field will always stay hidden when viewed on a survey page, but the field will be visible when viewing the same instrument as a data entry form, which might be helpful if you want to
If you want the output of the calculation to be...
Examples
a number
Use a calculated field
BMI, Age
a date
Use @CALCDATE
Find date 30 days after input date, etc.
text
Use @CALCTEXT
Check the value of several fields at once- for instance, if screening question answers indicate a participant is eligible for a study
(Note: some text below is taken from the REDCap Help & FAQ page)
Calculated fields can only return numerical values. You should use a calculated field any time you want REDCap to give you back a number, such as calculating a BMI or the number of days between two dates. Note that it is possible to use dates as input to calculated fields, as long as the result will be number (such as age), and not another date.
@CALCTEXT is an action tag you can use on a text field that can return a text value. For example, you can use this if you have an "if" statement and you want REDCap to display the word "TRUE" if the result is true and "FALSE" if the result is false. @CALCTEXT always returns text.
@CALCDATE is an action tag you can use on text field
Calculations in REDCap are generally performed only when a form containing the calculation (whether a calculated field, a @CALCDATE or @CALCTEXT) is opened for that record. Use Rule H to update the calculations in all records without you having to open each record individually.
This is important when:
Adding a new calculation (calculated field, @CALCDATE, and @CALCTEXT) to a project that already has records.
Updating an existing calculation
If any of the fields used in the calculation come from other forms. The input form may be updated, but if the form containing the calculation has not been opened since, then the calculation may have an old value.
If your project contains calculations, it is a good idea to run Rule H periodically, especially before doing a data export, to be sure your calculations are up-to-date in each record.
Run Rule H
On the left hand navigation bar, click the "Data Quality Rules".
On the line for Rule H, click the Execute button.
Once it has run, click on the tiny "View" link.
In the resulting pop-up box, click "Fix calcs now".
If this is a new calculation, do a quick manual check that the answers are correct- it is
Sometimes it is necessary to hide one or more of the possible answers (also known as "retire a choice" or "retire an option"). This prevents an answer from being used in the future, but does not delete it from existing records.
To do this, add @HIDECHOICE= 'n' in the Action Tags box, where n is the raw value, also called the choice number, of the answer to hide. To hide several choices, use a comma separated list, such as: @HIDECHOICE='1,2' to hide options 1 and 2.
The screenshot below demonstrates using the @HIDECHOICE Action Tag to hide the "Not sure" option from new users or survey participants, limiting their choices to "Yes" or "No". Records marked "Not sure" in the past will keep that answer.