Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

Version 1 Current »

The lookup helper allows for dynamic parameter resolution using IdealDoc variables. This can be useful for resolving values for array indexes.

{{#each people}}
{{.}} lives in {{lookup ../cities @index}} 
{{/each}}

It can also be used to lookup properties of object based on data from the input.The lookup helper allows for dynamic parameter resolution using variables.

It can also be used to lookup properties of object based on data from the input.

Example input:

{
  "lang": "en", --> will be queried dynamically from a field etc.
  "statusPicklistValue": "open", --> will be queried dynamically from a field etc.
  "Labels.de.open": "Offen",
  "Labels.de.closed": "Geschlossen",
  "Labels.en.open": "Open",
  "Labels.en.closed": "Closed",
  "Labels.de.status.open": "Offen",
  "Labels.de.status.closed": "Geschlossen",
  "Labels.en.status.open": "Open",
  "Labels.en.status.closed": "Closed",
  "Labels.open_de": "Offen",
  "Labels.closed_de": "Geschlossen",
  "Labels.open_en": "Open",
  "Labels.closed_en": "Closed",
}

Example template:

{{@p#with (lookup Labels lang)~}}
Text: {{lookup status @root.statusPicklistValue}}
{{@p/with}}
Or:
{{lookup (lookup Labels lang) statusPicklistValue}}
Or (with concat):
{{lookup Labels (concat statusPicklistValue "_" lang)}}
  • No labels