Set UDF
Last updated
Last updated
Available from: Clarity LIMS v2.0.5
Often, a user would like to set or change the value of a UDF. If the UDF is accessible from the initial process URI, the setUDF script can be used.
The setUDF script allows several operations to take place, including - but not limited to the following:
Set a UDF on an output container to today's date.
Set a UDF on any sample associated with any input to a person's name.
Set a UDF on any output to a lab name (referred to as 'Account' in Clarity LIMS).
Set the input container name as a process level UDF.
Read a project UDF and set it on a sample.
There are multiple ways to implement this script, as illustrated by the following examples.
Both the target entity and (optionally) the source value are expressed as chains of XPath expressions (using ->
as separators).
Even if you are using XPath to specify the source value, setUDF applies a single value per invocation to all target objects. It cannot apply different source values to different target objects.
You can use -z as an option when running the script to simulate the effects it would have. Note that even though an output identifying the target object(s) and the value that would be set is produced no changes are actually made.
Other scripts you may find useful:
In the examples shown above, the paths may differ for your system. For example, the version number may differ. For Clarity LIMS 4 or before, the process URI token should be:
Parameter
Description
-u {username}
(Required) LIMS login username
-p {password}
(Required) LIMS login password
-i {URI}
(Required) LIMS process URI
-f {name}
(Required) UDF names
-t {XPath}
(Required) Path to the target object
-s {XPath}
(Optional) Path to the source element/attribute
-v {value}
(Required if the path to the source value is not provided, optional otherwise) UDF value