case 4212

This commit is contained in:
2022-10-31 23:47:27 +00:00
parent 4817593507
commit 69749ef36a
22 changed files with 461 additions and 13 deletions

View File

@@ -166,11 +166,11 @@ A common use for the ayPrepareData function would be to insert or re-shape data
![report edit form helpers tab](img/report-edit-form-helpers-tab.png)
This optional section is for custom [Handlebars helper functions](https://handlebarsjs.com/guide/#custom-helpers) defined by the user.
This optional section is for custom [Handlebars helper functions](https://handlebarsjs.com/guide/#custom-helpers) defined by the user.
AyaNova comes with several [built in Handlebars helpers](#built-in-handlebars-helpers) however, this section is where you can add your own.
AyaNova comes with several [built in Handlebars helpers](#built-in-handlebars-helpers) however, this section is where you can add your own.
Any helper compatible with Handlebars can be defined here.
Any helper compatible with Handlebars can be defined here.
You can even use AyaNova API methods in your helpers if required to pull in data from other areas of AyaNova not directly provided in the report data.
@@ -180,7 +180,7 @@ You can even use AyaNova API methods in your helpers if required to pull in data
This read only section is for viewing sample data from real objects as a referece to the names of fields and "shape" of the collections available to use in your report template.
Data here is displayed in the report designer user interface when the report designer is opened via a business object.
Data here is displayed in the report designer user interface when the report designer is opened via a business object.
If you do not see this section it means the report designer was opened directly without passing through a business object first so there is no current data to display but you can still edit the report as normal. This can happen if you open a report from a History form or use the browser back button to go back to a report that was previously edited or open a report URL directly.
@@ -221,7 +221,9 @@ The report data provided comes directly from the Server and is not translated or
#### Custom fields in report data
In AyaNova an object can have up to 16 customizable fields of extra data. In the _SAMPLE DATA_ area of the report editor interface you can see the custom field data, for example:
In AyaNova an object can have up to [16 customizable fields](ay-customize.md#custom-fields) of extra data.
In the _SAMPLE DATA_ area of the report editor interface you can see the custom field data, for example:
```json
"CustomFields": {
@@ -241,6 +243,10 @@ Empty or non existent custom fields reference will simply result in nothing bein
If the custom field definitions are changed for an object then the reports must also be changed to match. For example if the c1 value was turned into a text field instead of a datetime field then the reports would need to be changed to match (for example removing the ayDT helper as it would now be a text field).
##### Example custom field report
In the Work order stock report templates we have an example report template showing Custom field usage on a report template titled "z_custom fields".
### ayClientMetaData
When a report is rendered some settings from AyaNova running at the User's browser are sent along with the report and are used as required to provide Translations and localized date, time and currency display formats as per the User's preferences as well as the current logged in User's API credential Bearer token and some other Client dependent settings.