I have an Item Type metadata field whose value depends on the values of other metadata fields. I'd like for a save filter to check those values and potentially adjust the value of the target field. What is the recommended way of getting those values?
I believe that the following methods should be possible:
1. Pull the record id from $args["record"]["id"], retrieve the item with get_record(), and extract metadata with metadata() as normal. (But this won't capture unsaved updates to the item, right?)
2. Query Omeka to get the element id for each field of interest, then pull them with $args["Elements"][$elementId].
For method 2, I'm thinking of something which pulls a single ItemType record and iterates over its Elements until the element with the right name is found. This feels awkward to me, and I suspect there is a straightforward way to accomplish this.
Thanks for any suggestions.