In the examples below the row 

reads the Value property of the PatientId object and saves it into LastResult variable. 

Using RVL Expression

Expression type allows use of some JavaScript syntax right in the RVL sheet.

  • The row 2 assigns string value to the LastResult.
  • The row 3 writes length of the string from the LastResult to the report. It uses the 'expression' type and expression value is 'LastResult.length'.

 

Here is some more info about parameters and parameter types: https://rapisedoc.inflectra.com/RVL/Params/

And about LastResult variable: https://rapisedoc.inflectra.com/RVL/Variables/#auto-assignment

 

Using JavaScript Function

Put this function in User.js:

function StrLen(/**string*/str)
{
	return (""+str).length;
}

And use it:

  • The row 2 assigns string value to the LastResult.
  • The row 3 re-writes LastResult with result of the StrLen function invocation (i.e. with calculated length).
  • The row 4 writes result of the row 3 to the report.
  •  

You may find more info about the Functions object here:

https://rapisedoc.inflectra.com/Guide/rvl_editor/#functions-object