Return author in a schedule expression

Each appointment created stores the current user as the Author - 

I was attempting to show that information in the schedule using

openvpms:get(.,'author.objectReference')/description

however it consistently returns an expression error

Anyone able to get this working or explain why the author field is not returnable.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Return author in a schedule expression

The author node is a participation relationship. You should use:

openvpms:get(., 'author.entity.description')

In the above:

  • author returns author node of the context object (the appointment), which is a participation.author
  • entity returns the entity node of participation.author, which will be a security.user
  • description returns the the description node of security.user

Re: Return author in a schedule expression

Thanks Tim

why does 

openvpms:get(.,'clinician.objectReference)\description 

work - it looked to be the same sort of node (which was why I used it as a starting point.

 

Regards
 
Ben 
OpenVPMS Installer and Helper 
Ph: +61423044823 
Email: info[at]charltonit.com[dot]au

Re: Return author in a schedule expression

Sorry - I've given you the wrong information. The above works if you have an appointment act. Schedules use PropertySets for performance reasons, so the above is incorrect.

You'll need to use:

openvpms:get(., 'act.objectReference.author.entity.description')

The act.objectReference returns the act.customerAppointment.

See ScheduleEvent for a list of available properties.

 

Syndicate content