Should "hasvalue" work in "Create keywords from this expression"?

Started by lbo, March 07, 2021, 07:26:46 PM

Previous topic - Next topic

lbo

Hi,

to get a conditional hierarchy separator für "Sublocation", I tried
{File.MD.location|hasvalue:test}
but this emits always "test" even if location is empty.

{File.MD.location|default:test} works as expected: Emits "test" only if sublocation is empty.

Anything wrong with my attempt?

Mario

This expression
[{File.MD.location}]
{File.MD.location|hasvalue:test}
{File.MD.location|default:test}

gives me either
[]

test


or

[Studio FFM]
test
Studio FFM


depending on whether or not the XMP location tag has data. Looks OK to me.
Did you check the actual contents of the location tag? Maybe it contains a blank or another invisible character?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

lbo

thanks for testing this.

I'm getting:

[]
test
test


and


[Neuhausen-Nymphenburg]
test
Neuhausen-Nymphenburg


respectively.

Maybe an error fixed after 2019.8.4 I'm still using.

I can work around it.

Mario

There have been many bug fixes since that old version. You can check https://www.photools.com/release-notes/ for all bug fixed since 2019.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook