The code block below illustrates how one might use # and // as comments in your logic and calculations.
# Text can be put here to explain what the logic/calculation does and why.
if ([field1] = '1' and [field2] > 7,
// This comment can explain what the next line does.
[score] * [factor],
// Return '0' if the condition is False.
0
)
This value you provided is not a number. Please try again.
This value you provided is not an integer. Please try again.
The value entered is not a valid Vanderbilt Medical Record Number (i.e. 4- to 9-digit number, excluding leading zeros). Please try again.
The value you provided must be within the suggested range
The value you provided is outside the suggested range
This value is admissible, but you may wish to double check it.
The value entered must be a time value in the following format HH:MM within the range 00:00-23:59 (e.g., 04:32 or 23:19).
This field must be a 5 or 9 digit U.S. ZIP Code (like 94043). Please re-enter it now.
This field must be a 10 digit U.S. phone number (like 415 555 1212). Please re-enter it now.
This field must be a valid email address (like joe@user.com). Please re-enter it now.
The value you provided could not be validated because it does not follow the expected format. Please try again.
Required format:
The code block below illustrates how one might use # and // as comments in your logic and calculations.
# Text can be put here to explain what the logic/calculation does and why.
if ([field1] = '1' and [field2] > 7,
// This comment can explain what the next line does.
[score] * [factor],
// Return '0' if the condition is False.
0
)
REDCap API Documentation
Import User-Role Assignments
This method allows you to assign users to any user role.
NOTE: If you wish to modify an existing mapping, you *must* provide its unique username and role name. If the 'unique_role_name' column is not provided, user will not assigned to any user role. There should be only one record per username.
https://chi-redcap.dshs.texas.gov/redcap/api/
POST
To use this method, you must have API Import/Update privileges *and* User Rights privileges in the project.
Requiredtoken
The API token specific to your REDCap project and username (each token is unique to each user for each project). See the section on the left-hand menu for obtaining a token for a given project.
content
userRoleMapping
action
import
format
csv, json, xml [default]
data
Contains the attributes 'username' (referring to the existing unique username) and 'unique_role_name' (referring to existing unique role name)
of each User-Role assignments to be modified, in which they are provided in the specified format. Note: If the project contains Data Access Groups, you may pass a third attribute
'data_access_group' with a valid unique DAG name of the DAG to which you wish to assign the user during the process of assigning them to a user role.
JSON Example:
[{"username":"global_user","unique_role_name":""},
{"username":"ca_dt_person","unique_role_name":"U-2119C4Y87T"},
{"username":"fl_dt_person","unique_role_name":"U-2119C4Y87T"}]
CSV Example:
username,unique_role_name
ca_dt_person,U-2119C4Y87T
fl_dt_person,U-2119C4Y87T
global_user,
XML Example:
<?xml version="1.0" encoding="UTF-8" ?>
<items>
<item>
<username>ca_dt_person</username>
<unique_role_name>U-2119C4Y87T</unique_role_name>
</item>
<item>
<username>fl_dt_person</username>
<unique_role_name>U-2119C4Y87T</unique_role_name>
</item>
<item>
<username>global_user</username>
<unique_role_name></unique_role_name>
</item>
</items>
OptionalreturnFormat
csv, json, xml - specifies the format of error messages. If you do not pass in this flag, it will select the default format for you passed based on the 'format' flag you passed in or if no format flag was passed in, it will default to 'xml'.
NOTE: Does not apply when importing as a background process (i.e., backgroundProcess=true). When using a background process, success:true (upon success) or success:false (upon failure) will be returned in the appropriate format (csv, json, xml).
ReturnsNumber of User-Role assignments added or updated