Finding first non-empty metadata tag

Started by monochrome, November 27, 2017, 02:37:43 PM

Previous topic - Next topic

monochrome

Is there a variable expression that will iterate over a set of metadata tags and take the value of the first tag that is not empty?

For example, if I have some photos with CreateDate, some with DateTimeOriginal, some with DateTimeDigitized and some with all three, is there a variable expression that will give me CreateDate if it exists, if not, DateTimeOriginal, and if not that, DateTimeDigitized, and finally, nothing; but not all three?

Mario

Did you try to use the hasvalue function? You can chain them, making default the next variable to test for a value.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

monochrome

Thanks! Didn't know they could be chained. The hasvalue function didn't make much sense to chain, but the "default" function did!

Mario

I think there might even be an example in the help.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook