{"Name":"109x EXAMPLE PO Custom fields","Active":true,"Notes":"example of using AyaNova provided Helpers to format custom fields","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t\t

Example: custom fields usage

\n\t\t

See help documentation for details

\n\t\t
\n\t
\n\t
\n\t\t{{#each ayReportData}} \n\t\t

PO # (internal key is Serial, to indicate a unique number ): {{ Serial }}


\n\t\tTags (if any tags, otherwise will show blank if none): {{Tags}}
\n\t\t

Custom fields

\n\t\t

Custom field items can be accessed via the main object's CustomFields property and then by dot notation for each of the 16 possible custom fields as .c1 to .c16 \n\t\tIf a custom field is unused it will return a blank for that item.

\n\t\t

(note, example assumes generated sample data and that c1 and c5 have data)

\n\t\tCustom c1 as DateTime: {{ ayDateTime CustomFields.c1}}
\n\t\tcustom c5 as Number: {{ ayDecimal CustomFields.c5}}
\t\t\n\n\t\t\t{{#each Items}} \n\t\t\t

For each PO Item (non custom fields)

\t\n\t\t\tPurchaseOrderCost as is in database: {{ PurchaseOrderCost}}
\t\t\n\t\t\tPurchaseOrderCost as Decimal Number (defaults to three decimal places): {{ ayDecimal PurchaseOrderCost}}
\t\t\n\t\t\tPurchaseOrderCost as Currency: {{ ayCurrency PurchaseOrderCost}}
\t\t\t\n\t\t\t{{/each}} \n\t\t\t
\n\t\t{{/each}} \n\t\t
\n\n\t
\n\n\n\n","Style":".example {\n color: blue;\n}\n","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":null,"MarginOptionsLeft":null,"MarginOptionsRight":null,"MarginOptionsTop":null,"PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":false,"Scale":1.00000}