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?
Variables always work the same. Double-check your syntax.
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!
What "does not work" mean?
No output? Different output?...
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.
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.
Thanks, John :D
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.