View Single Post
Old 04-10-2020, 09:42 PM   #7
Skydog
Wizard
Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.
 
Skydog's Avatar
 
Posts: 2,286
Karma: 7409537
Join Date: Mar 2009
Location: Circling Earth @ Mach .83
Device: Elipsa 2E, Sage, Libra Colour, Libra 2, Clara 2E, Oasis3, Voyage
Based on the reference I located (below), what template would I write if, for example, I currently have an existing "Finished" column (date), #finished lookup, and want to create a new composite column referencing the "Finished" column with its dates intact? I realize the example below is a slightly different situation but I still cannot figure out how to extract what I need. I am not a programmer, nor care to be. Thank you!

Beginning with an example, assume that you want your template to show the series for a book if it has one, otherwise show the value of a custom field #genre. You cannot do this in the basic language because you cannot make reference to another metadata field within a template expression. In program mode, you can. The following expression works:
{#series:'ifempty($, field('#genre'))'}

The example shows several things:
  • program mode is used if the expression begins with :' and ends with '. Anything else is assumed to be single-function.
  • the variable $ stands for the field the expression is operating upon, #series in this case.
Skydog is offline   Reply With Quote