0
Fixed

Cannot update LocationSurname

Carol Wapshere 5 years ago in UNIFYBroker/Micro Focus Content Manager updated by Beau Harrison (Senior Product Software Engineer) 5 years ago 4

Exporting LocationSurname to CM v9 is not working. The CM API returns no error, it just doesn't update the Surname.

I have successfully updated other attributes including LocationGivenNames, LocationJobDescription, LocationEmailAddress, LocationPhoneNumber and LocationIdNumber.

Some emailing around with the customer has revealed that they had a similar problem trying to bulk load data into the UAT environment using the "Data Loader". Someone thinks that the "Unique Name" field must be provided with the upload data when using a CSV file, and that this is a recent change in CM. (I have been unable to verify this and have no idea if the same issue would affect the API.)

I did try setting the LocationNickname as well (which is titled "Unique Name" in the API doco). I can also set this field but it doesn't make any difference to the Surname. I tried both:

- Setting the NickName then attempting to update the Surname on a subsequent export

- Setting the NickName and the Surname at the same time

For both the NickName was set, but the Surname did not change in CM.

Answer

Answer
Under review

Hi Carol

The LocationSurname is a composite field of LocationSurnamePrefix and LocationSurnameNoPrefix. In the API explorer, it is possible to set the LocationSurname field and the Prefix and NoPrefix fields are updated as needed. The CM client library, however, seems to block the ability to set LocationSurname, presumably because if you assign a no-prefix surname to LocationSurname instead of LocationSurnameNoPrefix, any value in LocationSurnamePrefix is lost.

To set the surname you'll have to use the LocationSurnamePrefix and LocationSurnameNoPrefix fields. Consider LocationSurname a readonly field, it will be by default in the next release.

Answer
Under review

Hi Carol

The LocationSurname is a composite field of LocationSurnamePrefix and LocationSurnameNoPrefix. In the API explorer, it is possible to set the LocationSurname field and the Prefix and NoPrefix fields are updated as needed. The CM client library, however, seems to block the ability to set LocationSurname, presumably because if you assign a no-prefix surname to LocationSurname instead of LocationSurnameNoPrefix, any value in LocationSurnamePrefix is lost.

To set the surname you'll have to use the LocationSurnamePrefix and LocationSurnameNoPrefix fields. Consider LocationSurname a readonly field, it will be by default in the next release.

Ahhh thankyou - clear as mud that API!

I'd also figured out that LocationSortName is not actually writeable either, and CM populates it based on the GivenNames and Surname values.

Fixed

Yes, LocationSortName is weird. Required but what you provide doesn't actually matter. Next release will probably have that field as readonly, as well.

Seems LocationSortName is the primary name field for non-user locations which is probably why it's a required field. It's the users type that has the strange behaviour. Will just make sure its documented along with LocationSurname and related fields.