Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Button handy
blanktrue
color#0052CC
nameSend Feedback
linkhttps://docs.google.com/forms/d/e/1FAIpQLScmToBe3vynAlb5fdKwCGxYqnTbDc66sIBgeecG2BuFDuHc7g/viewform?entry.2002826954=Retrieving+Data+From+a+Separate+File+-+15481580
widthauto

It is a good idea to keep data (such as JSON) and queries (such as SQL) in a separate file. The reason for this is because the data tends to read better. This article discusses techniques for keeping data in a separate file and how to import the data into a SIL script.

...

Info

Note that there are no forward slashes at the beginning of a relative path. Dot slash notation “./” is not supported.

Using the replace()

...

Function

Using the replace() routine function is absolutely essential if we want to treat data values as a variable. In our example below, let’s say we want to create a custom template. To create a variable in the target file, wrap the variable name in curly braces using the following format: ${<name of variable goes here>}.

...