photools.com Community

IMatch Discussion Boards => General Discussion and Questions => Topic started by: lbo on March 07, 2021, 07:26:46 PM

Title: Should "hasvalue" work in "Create keywords from this expression"?
Post by: lbo on March 07, 2021, 07:26:46 PM
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?
Title: Re: Should "hasvalue" work in "Create keywords from this expression"?
Post by: Mario on March 07, 2021, 07:54:14 PM
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?
Title: Re: Should "hasvalue" work in "Create keywords from this expression"?
Post by: lbo on March 07, 2021, 08:07:33 PM
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.
Title: Re: Should "hasvalue" work in "Create keywords from this expression"?
Post by: Mario on March 07, 2021, 08:48:25 PM
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.