Change in the way a xpath works in 1.9 Release

We have been using the following xpath statement in a number of documents

to account for the fact that prior to 1.8 we didn't record Microchip implant location....

[openvpms:get(party:getMicrochip(.), "implantDate", startTime)]

However in the new release it returns a empty field when the implantDate is blank.

The underlying idea was to return the current start time when the date was blank.  

Under the new system with no date set or implantSite - the form is still blank for those fields.  I assume that what is happening is the field is set for null in the db but the node is still present and being returned?

Should the xpath for get if it returns as blank or null still return the default rather than empty?

I am not sure if this behaviour has changed or not but we previously have never had issues with this form.

Comment viewing options

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

Re: Change in the way a xpath works in 1.9 Release

Try the following:

[openvpms:get(party:getMicrochip(.), "implantDate", openvpms:get(., 'startTime')]

I suspect startTime is undefined in the original version. Note that the above assumes the context object (i.e. the dot) is an act.

 

Syndicate content