Schedule view expression to get customer last name
Submitted by Guest on Fri, 25/10/2013 - 06:09
[I feel embarrassed to have to ask this - I should know how to do it.]
Currently I am using openvpms:get(.,'customer.name') to get the customer name - this returns lastName,firstName. I would like to grab just the last name. However openvpms:get(.,'customer.lastName') does not seem to work.
What should I be using?
Regards, Tim G
Re: Schedule view expression to get customer last name
The set of values available to schedule view expressions are simple values rather than instances of archetypes, so the usual rules don't apply.
You'll need to go via the customer.objectReference key e.g.:
Note that this may impact performance, as it has to read in the customer twice to perform the above operation. The performance implications are the main reason this is not provided as a field in the expression editor.
For a list of the available keys, see the ScheduleEvent class.
-Tim A