photools.com Community

IMatch Discussion Boards => General Discussion and Questions => Topic started by: Darius1968 on May 05, 2022, 11:25:09 PM

Title: Keywords as a list in FWT
Post by: Darius1968 on May 05, 2022, 11:25:09 PM
I can get my keywords enumerated as a list in VarToy with this statement:  {File.MD.XMP::Lightroom\hierarchicalSubject\HierarchicalSubject\0|replace:~;=={lf}}
However, that statement has no effect in the File Window Tip.  Why and how can I make it so? 
Title: Re: Keywords as a list in FWT
Post by: Mario on May 06, 2022, 12:09:59 AM
Variables always work the same. Double-check your syntax.
Title: Re: Keywords as a list in FWT
Post by: Darius1968 on May 06, 2022, 12:25:13 AM
I originally checked the syntax.  And, just now, checked it again - I did a copy/paste from my entry in VarToy into the FWT...Doesn't work in FWT! 
Title: Re: Keywords as a list in FWT
Post by: Mario on May 06, 2022, 12:51:07 AM
What "does not work" mean?
No output? Different output?...
Title: Re: Keywords as a list in FWT
Post by: Darius1968 on May 06, 2022, 12:59:24 AM
The output in FWT - using {File.MD.XMP::Lightroom\hierarchicalSubject\HierarchicalSubject\0|replace:~;=={lf}} - is just each keyword displayed one right after another - There is no new line, nor is each keyword separated with a semicolon. 
Title: Re: Keywords as a list in FWT
Post by: JohnZeman on May 06, 2022, 01:24:13 AM
You need to add one more thing to your configuration, a pereplace operation that follows the replace operation.

Below is my configuration to display hierarchal keywords in a list format, one hierarchal keyword per line as you can see in the attached screenshot.

<Run Foreground='#cccccc' FontWeight='Normal' FontSize='14'>Hierarchal Keywords:</Run><LineBreak/>{File.MD.XMP::Lightroom\hierarchicalSubject\HierarchicalSubject\0|replace:~;==XXX;pereplace:XXX==<LineBreak/>}

The replace operation only temporarily replaces each ; with something that will never be found in my keywords, for that I used XXX.
Then pereplace, which works after replace is finished, replaces each XXX with a linebreak.

See the https://www.photools.com/help/imatch/var_basics.htm (https://www.photools.com/help/imatch/var_basics.htm) help page for more information.
Title: Re: Keywords as a list in FWT
Post by: Darius1968 on May 06, 2022, 01:48:38 AM
Thanks, John  :D
Title: Re: Keywords as a list in FWT
Post by: Mario on May 06, 2022, 08:50:19 AM
Quote from: Darius1968 on May 06, 2022, 12:59:24 AM
The output in FWT - using {File.MD.XMP::Lightroom\hierarchicalSubject\HierarchicalSubject\0|replace:~;=={lf}} - is just each keyword displayed one right after another - There is no new line, nor is each keyword separated with a semicolon.
That is to be expected. The File Window (and Tip) use XAML for rendering (sort of HTML), and line feeds have no meaning there - they are ignored. This is not the effect you want.
As John explained above, you need to insert <LineBreak/> instead, which produces a new line in XAML.

See Variables (https://www.photools.com/help/imatch/var_basics.htm) and search for LineBreak for a number of examples and more in-depth explanation.