case 4212
@@ -80,6 +80,8 @@ There are three steps to enabling a Custom field:
|
||||
|
||||
3. Change the User's translation(s) to show the desired title above the control: Make a note of the translation key for the custom field. It will be shown just beneath the current translation for that field, for example "Custom5" in the Customer form has an internal translation key of "CustomerCustom5". Save your changes here and then use the translation key to [find and edit the translation](adm-translations.md) so that the desired title shows with the Custom field. There is a _Translation_ menu item on the Customize form to save a click.
|
||||
|
||||
We have a [Guided tour for custom fields](tour-bizadmin-form-custom-fields.md) available walking through the process.
|
||||
|
||||
#### Changing the data type later
|
||||
|
||||
If you change the data type of a custom field after data has been entered AyaNova will do it's best to work with that change but it's not recommended. It's better to simply hide the former custom control and show a new one with the new data type.
|
||||
|
||||
@@ -166,11 +166,11 @@ A common use for the ayPrepareData function would be to insert or re-shape data
|
||||
|
||||

|
||||
|
||||
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.
|
||||
|
||||
@@ -31,6 +31,7 @@ This is a local device setting only (not saved to the server) to allow for diffe
|
||||
|
||||
This setting is _required_ and controls which [translation](adm-translations.md) of AyaNova is used to display program text to the current logged in user.
|
||||
The default value is "en" for English.
|
||||
|
||||
If you change the language setting here you must logout and back in for the changes to take effect.
|
||||
|
||||
#### User email address
|
||||
|
||||
BIN
docs/8.0/ayanova/docs/img/tour-biz-admin-custom-translation.png
Normal file
|
After Width: | Height: | Size: 77 KiB |
BIN
docs/8.0/ayanova/docs/img/tour-biz-admin-custom-translations.png
Normal file
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 167 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 79 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 62 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 57 KiB |
|
After Width: | Height: | Size: 37 KiB |
BIN
docs/8.0/ayanova/docs/img/tour-nav-biz-admin-translations.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
181
docs/8.0/ayanova/docs/tour-bizadmin-form-custom-fields.md
Normal file
@@ -0,0 +1,181 @@
|
||||
# Guided tour: Custom fields
|
||||
|
||||
In this guided tour we'll add some Custom fields on a Customer edit form.
|
||||
|
||||
This tour relies on a custom Translation already in use so if you are following along and making changes and haven't already made a custom Translation you should take the [Custom Translation tour](tour-bizadmin-form-custom-translation.md) first then come back here.
|
||||
|
||||
If you're reading through the tour without making changes then you don't really need to take the [Custom Translation tour](tour-bizadmin-form-custom-translation.md) first.
|
||||
|
||||
The same technique you learn here applies to any other type of form in AyaNova.
|
||||
|
||||
AyaNova has a _lot_ of fields built in for each object but sometimes you need to enter and track something that AyaNova doesn't include.
|
||||
|
||||
AyaNova has a built in [Custom fields feature](ay-customize.md/#custom-fields) for exactly this situation.
|
||||
|
||||
Adding Custom form fields applies to _all users_ of AyaNova equally.
|
||||
|
||||
The screen shots will show how AyaNova looks on a PC or tablet, if you are using a narrow screen device such as a smart phone your view will be [slightly different](ay-start-form-overview.md#responsive-display) but the functionality is the same.
|
||||
|
||||
If you don't already have AyaNova available to follow along, everything you need to get started is available here: [Try AyaNova now](ay-evaluate.md).
|
||||
|
||||
## 1\. Login as a user with permission to modify form fields
|
||||
|
||||
In AyaNova a [User](adm-users.md) needs permission to view and make changes to objects, this permission is called an [Authorization role](ay-biz-admin-roles.md) in AyaNova and an administrator [grants permissions](adm-users.md#authorization-roles) to each User as required.
|
||||
|
||||
Only a User with the [Business administration role](ay-biz-admin-roles.md#business-administration) can customize forms and add custom fields.
|
||||
|
||||
For this tour you should login as a User with one of those Roles.
|
||||
|
||||
If you are using generated AyaNova [sample data](ay-evaluate.md#generating-sample-data), we've provided a sample User for each type of Role so for this tour you should login as the `Business Admin` / `BizAdmin` sample User to follow along:
|
||||
|
||||

|
||||
|
||||
## 2\. Open a Customer edit form
|
||||
|
||||
Edit forms are customized _from_ the type of form you want to edit.
|
||||
|
||||
When you are logged in as a BizAdmin role User a _Customize_ menu option will appear in any form that can be Customized.
|
||||
|
||||
The _Customize_ option is now available in new, empty records so you need to open an existing record to get to that option.
|
||||
|
||||
So the first step is to get to a Customer's edit form, it doesn't matter _which_ Customer, any one will do.
|
||||
|
||||
Navigate to an area of AyaNova where Customers are displayed in their data table. There are a few different ways to get there but we'll use the simplest one for this tour and open a Customer from the Customers data table list.
|
||||
|
||||
### Click on the "Hamburger" icon
|
||||
|
||||
In AyaNova the main way to navigate around is by using the [navigation drawer](ay-start-form-overview.md#navigation-drawer) which is an area that slides out on screen to choose where you want to go.
|
||||
|
||||
When logged in you can access the navigation drawer from what is commonly known as a "hamburger" icon (highlighted below) because it looks kind of like a hamburger:
|
||||
|
||||

|
||||
|
||||
Click on the hamburger icon to show the navigation drawer.
|
||||
|
||||
### Navigation drawer Customers items
|
||||
|
||||
In the image below you can see the options available to the sample "Business admin" User generated by AyaNova. Users with a different set of Roles will see different options here.
|
||||
|
||||

|
||||
|
||||
The area we want is "Customers" and the sub item also "Customers" so go ahead and click on that to cause AyaNova to navigate to the list of Customers previously entered in AyaNova:
|
||||
|
||||

|
||||
|
||||
This list is known in AyaNova as a ["Data table"](ay-start-form-data-tables.md), data tables are used in many places in AyaNova for different kinds of objects. Data tables have many [features and options](ay-start-form-data-tables.md) to control what is displayed and how it's displayed so you can restrict the view to show only what is important for any given task.
|
||||
|
||||
### Open a Customer record
|
||||
|
||||
Now click on any Customer's name in the list to open their record in the [Customer edit form](customers.md).
|
||||
|
||||

|
||||
|
||||
In the image above we can see the top part of a Customer edit form. We'll stick with the top part so the images are easier to see in this manual but the steps apply to a field _anywhere_ on a form.
|
||||
|
||||
## 3\. Customize
|
||||
|
||||
We've decided that our company now has a policy of having a sales manager contact each Customer regularly and find out how we're doing and see if there is any new business we can provide so we're going to add a text field called "Sales manager notes" and a date field called "Last sales manager contact" for this example.
|
||||
|
||||
Click on the menu button in the top right of the form. We're logged in as a Business Administration role user in [step 1](#1-login-as-a-user-with-permission-to-modify-form-fields) so when we open the menu on a form we see a _Customize_ option:
|
||||
|
||||

|
||||
|
||||
If you don't see a _Customize_ menu option it means you're either not logged in as a User with the [permission](#1-login-as-a-user-with-permission-to-modify-form-fields) to customize forms or you are in a new empty record and haven't opened an existing record as [required for customization](#2-open-a-customer-edit-form).
|
||||
|
||||
Go ahead and click on _Customize_ now to open the [form customization interface](ay-customize.md):
|
||||
|
||||

|
||||
|
||||
In the image above you can see boxes representing each field that _can be customized_ on this form. The Custom fields are located after the stock fields that come with AyaNova and are labelled Custom1 to Custom16.
|
||||
|
||||
In the image we've scrolled down so you can see the Custom fields available.
|
||||
|
||||
The title at the top of each box shows how it displays in your current language on the form you just came from. Below that is the [translation key](adm-translations.md)
|
||||
|
||||
In this form you can do other things besides require fields for example making a field [hidden (tour)](tour-bizadmin-form-remove-fields.md) or [required (tour)](tour-bizadmin-form-require-fields.md).
|
||||
|
||||
For this tour we're going to enable a couple of Custom fields and set their data type appropriately.
|
||||
|
||||
Custom fields show on the form when their _Visible_ property is checked and the type of control displayed is set by the _Type_ property.
|
||||
|
||||
We want a Text field for our Sales manager notes and a Date field for our Last contact fields.
|
||||
|
||||
Since no Custom fields are currently enabled we'd normally use Custom1 and Custom2 for this purpose but for this tour to make the screen shots smaller we'll use Custom2 and Custom3. It doesn't actually matter which ones you use as long as you remember the field number you used for a later step.
|
||||
|
||||

|
||||
|
||||
In the image above you can see we've set Custom2 to visible and of type Text and are setting Custom3 to type Date only.
|
||||
|
||||
Note also the translation key below the name of each field; "CustomerCustom2" and "CustomerCustom3". We're going to need that information for the next step.
|
||||
|
||||
At this point we'll click on the save button to save our customization and click on our browser's back button to go back to the Customer form just to confirm we can see our newly enabled Custom fields:
|
||||
|
||||

|
||||
|
||||
The fields are now there and ready for input but they need to have a title that explains what type of data is supposed to go there.
|
||||
|
||||
We need to set these titles in the [Translation](adm-translations.md) form in our [Custom Translation we previously created in a previous tour](tour-bizadmin-form-custom-translation.md).
|
||||
|
||||
Let's navigate to the Translations form now, there's two ways to get there:
|
||||
|
||||
One way is by opening the Customize form again and using the Translation menu option:
|
||||
|
||||

|
||||
|
||||
Or by using the Navigation drawer to go to Translations:
|
||||
|
||||

|
||||
|
||||
Here we can see the stock Translations and any custom Translations created previously:
|
||||
|
||||

|
||||
|
||||
We'll go ahead and open our custom translation all our [Users are set to use](home-user-settings.md#translation):
|
||||
|
||||

|
||||
|
||||
In a previous step we identified the Translation keys we want to change as being "CustomerCustom2" for the text field and "CustomerCustom3" for the date field.
|
||||
|
||||
We _could_ click through each page of the translations until we get to those fields but it's much faster to just search for them:
|
||||
|
||||

|
||||
|
||||
Here we typed in "CustomerCustom" in the search box which restricted the list to matching fields.
|
||||
|
||||
We can see the two fields we want "CustomerCustom2" and "CustomerCustom3" at the bottom of the list.
|
||||
|
||||
We'll click on the "Custom2" text in the Display column to edit this field and type in the display text we want to show:
|
||||
|
||||

|
||||
|
||||
Then click on OK to save the change and do the same for the "Last sales manager contact" (Custom3) field, click on OK and see our changes:
|
||||
|
||||

|
||||
|
||||
The changes are made here temporarily but not saved yet so we'll click on the Save button at the top of the custom Translation edit form to save the changes to the server for all Users.
|
||||
|
||||
We'll return to the Customer edit form and see our changes in action. Since we were the User that made the translation changes and we're using the Translation we changed we don't need to logout and back in to see them like other User's would need to, we can see it right away.
|
||||
|
||||
The fastest way to get back to the Customer edit form is to use our browsers back button repeatedly until we see the form we want:
|
||||
|
||||

|
||||
|
||||
Our Custom fields are complete and ready for use.
|
||||
|
||||
### Other users
|
||||
|
||||
Other Users will see the Custom fields the next time they open the form that was customized however they will see them with the Titles that were present for those Custom fields at the time they logged in, so they will need to log out and back in to see the proper titles you set in the Translation.
|
||||
|
||||
It's best to enable custom fields in coordination with the other Users or after hours so they don't see a field appear without the proper title above it and get confused.
|
||||
|
||||
### Reporting and printing Custom fields
|
||||
|
||||
If you want to generate reports that contain the custom fields added you can do that via the [report template editor](ay-report-edit#custom-fields-in-report-data).
|
||||
|
||||
### Disable custom fields
|
||||
|
||||
If you no longer require the Custom fields you can set them to hidden in the Customization form; previously entered data will remain in place but the fields will no longer show on the form, they will need to be manually removed from reports if enabled there.
|
||||
|
||||
## What about previously entered records?
|
||||
|
||||
Previously created records will just be empty in the custom fields enabled until filled in.
|
||||
141
docs/8.0/ayanova/docs/tour-bizadmin-form-custom-translation.md
Normal file
@@ -0,0 +1,141 @@
|
||||
# Guided tour: Custom fields
|
||||
|
||||
In this guided tour we'll add some Custom fields on a Customer edit form.
|
||||
|
||||
The same technique you learn here applies to any other type of form in AyaNova.
|
||||
|
||||
AyaNova has a _lot_ of fields built in for each object but sometimes you need to enter and track something that AyaNova doesn't include.
|
||||
|
||||
AyaNova has a built in [Custom fields feature](ay-customize.md/#custom-fields) for exactly this situation.
|
||||
|
||||
Adding Custom form fields applies to _all users_ of AyaNova equally.
|
||||
|
||||
The screen shots will show how AyaNova looks on a PC or tablet, if you are using a narrow screen device such as a smart phone your view will be [slightly different](ay-start-form-overview.md#responsive-display) but the functionality is the same.
|
||||
|
||||
If you don't already have AyaNova available to follow along, everything you need to get started is available here: [Try AyaNova now](ay-evaluate.md).
|
||||
|
||||
## 1\. Login as a user with permission to modify form fields
|
||||
|
||||
In AyaNova a [User](adm-users.md) needs permission to view and make changes to objects, this permission is called an [Authorization role](ay-biz-admin-roles.md) in AyaNova and an administrator [grants permissions](adm-users.md#authorization-roles) to each User as required.
|
||||
|
||||
Only a User with the [Business administration role](ay-biz-admin-roles.md#business-administration) can customize forms and add custom fields.
|
||||
|
||||
For this tour you should login as a User with one of those Roles.
|
||||
|
||||
If you are using generated AyaNova [sample data](ay-evaluate.md#generating-sample-data), we've provided a sample User for each type of Role so for this tour you should login as the `Business Admin` / `BizAdmin` sample User to follow along:
|
||||
|
||||

|
||||
|
||||
## 2\. Open a Customer edit form
|
||||
|
||||
Edit forms are customized _from_ the type of form you want to edit.
|
||||
|
||||
When you are logged in as a BizAdmin role User a _Customize_ menu option will appear in any form that can be Customized.
|
||||
|
||||
The _Customize_ option is now available in new, empty records so you need to open an existing record to get to that option.
|
||||
|
||||
So the first step is to get to a Customer's edit form, it doesn't matter _which_ Customer, any one will do.
|
||||
|
||||
Navigate to an area of AyaNova where Customers are displayed in their data table. There are a few different ways to get there but we'll use the simplest one for this tour and open a Customer from the Customers data table list.
|
||||
|
||||
### Click on the "Hamburger" icon
|
||||
|
||||
In AyaNova the main way to navigate around is by using the [navigation drawer](ay-start-form-overview.md#navigation-drawer) which is an area that slides out on screen to choose where you want to go.
|
||||
|
||||
When logged in you can access the navigation drawer from what is commonly known as a "hamburger" icon (highlighted below) because it looks kind of like a hamburger:
|
||||
|
||||

|
||||
|
||||
Click on the hamburger icon to show the navigation drawer.
|
||||
|
||||
### Navigation drawer Customers items
|
||||
|
||||
In the image below you can see the options available to the sample "Business admin" User generated by AyaNova. Users with a different set of Roles will see different options here.
|
||||
|
||||

|
||||
|
||||
The area we want is "Customers" and the sub item also "Customers" so go ahead and click on that to cause AyaNova to navigate to the list of Customers previously entered in AyaNova:
|
||||
|
||||

|
||||
|
||||
This list is known in AyaNova as a ["Data table"](ay-start-form-data-tables.md), data tables are used in many places in AyaNova for different kinds of objects. Data tables have many [features and options](ay-start-form-data-tables.md) to control what is displayed and how it's displayed so you can restrict the view to show only what is important for any given task.
|
||||
|
||||
### Open a Customer record
|
||||
|
||||
Now click on any Customer's name in the list to open their record in the [Customer edit form](customers.md).
|
||||
|
||||

|
||||
|
||||
In the image above we can see the top part of a Customer edit form. We'll stick with the top part so the images are easier to see in this manual but the steps apply to a field _anywhere_ on a form.
|
||||
|
||||
## 3\. Customize
|
||||
|
||||
We've decided that our company now has a policy of having a sales manager contact each Customer regularly and find out how we're doing and see if there is any new business we can provide so we're going to add a text field called "Sales manager notes" and a date field called "Last sales manager contact" for this example.
|
||||
|
||||
Click on the menu button in the top right of the form. We're logged in as a Business Administration role user in [step 1](#1-login-as-a-user-with-permission-to-modify-form-fields) so when we open the menu on a form we see a _Customize_ option:
|
||||
|
||||

|
||||
|
||||
If you don't see a _Customize_ menu option it means you're either not logged in as a User with the [permission](#1-login-as-a-user-with-permission-to-modify-form-fields) to customize forms or you are in a new empty record and haven't opened an existing record as [required for customization](#2-open-a-customer-edit-form).
|
||||
|
||||
Go ahead and click on _Customize_ now to open the [form customization interface](ay-customize.md):
|
||||
|
||||

|
||||
|
||||
In the image above you can see boxes representing each field that _can be customized_ on this form. The Custom fields are located after the stock fields that come with AyaNova and are labelled Custom1 to Custom16.
|
||||
|
||||
In the image we've scrolled down so you can see the Custom fields available.
|
||||
|
||||
The title at the top of each box shows how it displays in your current language on the form you just came from. Below that is the [translation key](adm-translations.md)
|
||||
|
||||
In this form you can do other things besides require fields for example making a field [hidden (tour)](tour-bizadmin-form-remove-fields.md) or [required (tour)](tour-bizadmin-form-require-fields.md).
|
||||
|
||||
For this tour we're going to enable a couple of Custom fields and set their data type appropriately.
|
||||
|
||||
Custom fields show on the form when their _Visible_ property is checked and the type of control displayed is set by the _Type_ property.
|
||||
|
||||
We want a Text field for our Sales manager notes and a Date field for our Last contact fields.
|
||||
|
||||
Since no Custom fields are currently enabled we'd normally use Custom1 and Custom2 for this purpose but for this tour to make the screen shots smaller we'll use Custom2 and Custom3. It doesn't actually matter which ones you use as long as you remember the field number you used for a later step.
|
||||
|
||||

|
||||
|
||||
In the image above you can see we've set Custom2 to visible and of type Text and are setting Custom3 to type Date only.
|
||||
|
||||
Note also the translation key below the name of each field; "CustomerCustom2" and "CustomerCustom3". We're going to need that information for the next step.
|
||||
|
||||
At this point we'll click on the save button to save our customization and click on our browser's back button to go back to the Customer form just to confirm we can see our newly enabled Custom fields:
|
||||
|
||||

|
||||
|
||||
The fields are now there and ready for input but they need to have a title that explains what type of data is supposed to go there. We need to set these titles in the [Translation](adm-translations.md) form.
|
||||
|
||||
Let's navigate to the Translations form now, there's two ways to get there:
|
||||
|
||||
One way is by opening the Customize form again and using it's "Translations" menu option:
|
||||
|
||||

|
||||
|
||||
Or by using the Navigation drawer to go to Translations:
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
We are now at our Translations data table and can open our custom translation we created earlier for all our Users.
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
### Other users
|
||||
|
||||
As soon as you saved the customization changes they took effect for all other Users as soon as they next open the Customer edit form. In other words if they were actively editing a Customer they wouldn't see a change but the moment they opened another Customer for editing the change would take effect.
|
||||
|
||||
### Oops!
|
||||
|
||||
You just realized you made a mistake and don't want to require the `Email` field. No problem, just click on Customize in the menu again and remove the checkmark beside the _Required_ property in the `Email` customization box, save your changes and email addresses are no longer required!
|
||||
|
||||
## What about previously entered records?
|
||||
|
||||
Requiring a field doesn't affect any existing records so, in our example, previously entered Customers that don't have email addresses will only trigger the required rule when someone edits them and attempts to save them.
|
||||
@@ -20,13 +20,13 @@ If you don't already have AyaNova available to follow along, everything you need
|
||||
|
||||
In AyaNova a [User](adm-users.md) needs permission to view and make changes to objects, this permission is called an [Authorization role](ay-biz-admin-roles.md) in AyaNova and an administrator [grants permissions](adm-users.md#authorization-roles) to each User as required.
|
||||
|
||||
Only a User with the [Business administration role](ay-biz-admin-roles.md#business-administration) can remove or show form fields.
|
||||
Only a User with the [Business administration role](ay-biz-admin-roles.md#business-administration) can customize forms to remove or show fields.
|
||||
|
||||
For this tutorial you should login as a User with one of those Roles.
|
||||
|
||||
If you are using generated AyaNova [sample data](ay-evaluate.md#generating-sample-data), we've provided a sample User for each type of Role so for this tour you should login as the `Business Admin` / `BizAdmin` sample User to follow along:
|
||||
|
||||

|
||||

|
||||
|
||||
## 2\. Open a Customer edit form
|
||||
|
||||
@@ -34,6 +34,8 @@ Edit forms are customized _from_ the type of form you want to edit.
|
||||
|
||||
When you are logged in as a BizAdmin role User a _Customize_ menu option will appear in any form that can be Customized.
|
||||
|
||||
The _Customize_ option is now available in new, empty records so you need to open an existing record to get to that option.
|
||||
|
||||
So the first step is to get to a Customer's edit form, it doesn't matter _which_ Customer, any one will do.
|
||||
|
||||
Navigate to an area of AyaNova where Customers are displayed in their data table. There are a few different ways to get there but we'll use the simplest one for this tutorial and open a Customer from the Customers data table list.
|
||||
@@ -76,19 +78,21 @@ Click on the menu button in the top right of the form. We're logged in as a Busi
|
||||
|
||||

|
||||
|
||||
If you don't see a _Customize_ menu option it means you're either not logged in as a User with the [permission](#1-login-as-a-user-with-permission-to-modify-form-fields) to customize forms or you are in a new empty record and haven't opened an existing record as [required for customization](#2-open-a-customer-edit-form).
|
||||
|
||||
Go ahead and click on _Customize_ now to open the [form customization interface](ay-customize.md):
|
||||
|
||||

|
||||
|
||||
In the image above you can see boxes representing each field that _can be customized_ on this form.
|
||||
|
||||
The title at the top of each box shows how it displays in your current language on the form you just came from. Below that is the [translation key]()
|
||||
The title at the top of each box shows how it displays in your current language on the form you just came from. Below that is the [translation key](adm-translations.md)
|
||||
|
||||
Fields that can _not_ be customized are not shown on this form. For example the Customer "Name" field is required so it can not be hidden and is not displayed here.
|
||||
|
||||
In this form you can do other things besides hide fields for example making a field required or using Custom fields which we have separate guided tours for each of those concepts.
|
||||
In this form you can do other things besides hide fields for example making a field [required (tour)](tour-bizadmin-form-require-fields.md) or enabling [Custom fields (tour)](tour-bizadmin-form-custom-fields.md).
|
||||
|
||||
For this tour we'll remove the checkmark from the "Visible" checkbox to hide the following fields:
|
||||
For this tour we'll remove the checkmark from the "Visible" property to hide the following fields:
|
||||
|
||||
`Account number`, `Fax`, `Home`, `Mobile`, `Pager`
|
||||
|
||||
@@ -108,7 +112,7 @@ As soon as you saved the customization changes they took effect for all other Us
|
||||
|
||||
### Oops!
|
||||
|
||||
You just realized you made a mistake and don't want to hide the `Fax` field as Faxes are actually used for some of your customers still (and faxes are making a comeback). No problem, no data has been lost, just click on Customize in the menu again and put a checkmark beside the _Visible_ field in the `Fax` customization box, save your changes and faxes are back!
|
||||
You just realized you made a mistake and don't want to hide the `Fax` field as Faxes are actually used for some of your customers still (and faxes are making a comeback). No problem, no data has been lost, just click on Customize in the menu again and put a checkmark beside the _Visible_ property in the `Fax` customization box, save your changes and faxes are back!
|
||||
|
||||
## What happens to the data of a removed field?
|
||||
|
||||
|
||||
111
docs/8.0/ayanova/docs/tour-bizadmin-form-require-fields.md
Normal file
@@ -0,0 +1,111 @@
|
||||
# Guided tour: Require entry in edit form fields
|
||||
|
||||
In this guided tour we'll make some fields on a Customer edit form required for entry.
|
||||
|
||||
The same technique you learn here applies to any other type of form in AyaNova.
|
||||
|
||||
AyaNova has some fields that are required like the Name of most objects, but we try to keep that to a minimum and so most fields can be left empty, but sometimes you _need_ a field to be filled in and so it's useful to be able to set a field to required entry.
|
||||
|
||||
Requiring entry in form fields applies to _all users_ of AyaNova equally.
|
||||
|
||||
The screen shots will show how AyaNova looks on a PC or tablet, if you are using a narrow screen device such as a smart phone your view will be [slightly different](ay-start-form-overview.md#responsive-display) but the functionality is the same.
|
||||
|
||||
If you don't already have AyaNova available to follow along, everything you need to get started is available here: [Try AyaNova now](ay-evaluate.md).
|
||||
|
||||
## 1\. Login as a user with permission to modify form fields
|
||||
|
||||
In AyaNova a [User](adm-users.md) needs permission to view and make changes to objects, this permission is called an [Authorization role](ay-biz-admin-roles.md) in AyaNova and an administrator [grants permissions](adm-users.md#authorization-roles) to each User as required.
|
||||
|
||||
Only a User with the [Business administration role](ay-biz-admin-roles.md#business-administration) can customize form fields to required.
|
||||
|
||||
For this tour you should login as a User with one of those Roles.
|
||||
|
||||
If you are using generated AyaNova [sample data](ay-evaluate.md#generating-sample-data), we've provided a sample User for each type of Role so for this tour you should login as the `Business Admin` / `BizAdmin` sample User to follow along:
|
||||
|
||||

|
||||
|
||||
## 2\. Open a Customer edit form
|
||||
|
||||
Edit forms are customized _from_ the type of form you want to edit.
|
||||
|
||||
When you are logged in as a BizAdmin role User a _Customize_ menu option will appear in any form that can be Customized.
|
||||
|
||||
The _Customize_ option is now available in new, empty records so you need to open an existing record to get to that option.
|
||||
|
||||
So the first step is to get to a Customer's edit form, it doesn't matter _which_ Customer, any one will do.
|
||||
|
||||
Navigate to an area of AyaNova where Customers are displayed in their data table. There are a few different ways to get there but we'll use the simplest one for this tour and open a Customer from the Customers data table list.
|
||||
|
||||
### Click on the "Hamburger" icon
|
||||
|
||||
In AyaNova the main way to navigate around is by using the [navigation drawer](ay-start-form-overview.md#navigation-drawer) which is an area that slides out on screen to choose where you want to go.
|
||||
|
||||
When logged in you can access the navigation drawer from what is commonly known as a "hamburger" icon (highlighted below) because it looks kind of like a hamburger:
|
||||
|
||||

|
||||
|
||||
Click on the hamburger icon to show the navigation drawer.
|
||||
|
||||
### Navigation drawer Customers items
|
||||
|
||||
In the image below you can see the options available to the sample "Business admin" User generated by AyaNova. Users with a different set of Roles will see different options here.
|
||||
|
||||

|
||||
|
||||
The area we want is "Customers" and the sub item also "Customers" so go ahead and click on that to cause AyaNova to navigate to the list of Customers previously entered in AyaNova:
|
||||
|
||||

|
||||
|
||||
This list is known in AyaNova as a ["Data table"](ay-start-form-data-tables.md), data tables are used in many places in AyaNova for different kinds of objects. Data tables have many [features and options](ay-start-form-data-tables.md) to control what is displayed and how it's displayed so you can restrict the view to show only what is important for any given task.
|
||||
|
||||
### Open a Customer record
|
||||
|
||||
Now click on any Customer's name in the list to open their record in the [Customer edit form](customers.md).
|
||||
|
||||

|
||||
|
||||
In the image above we can see the top part of a Customer edit form. We'll stick with the top part so the images are easier to see in this manual but the steps apply to a field _anywhere_ on a form.
|
||||
|
||||
## 3\. Customize
|
||||
|
||||
Normally the Email address is optional in a Customer record but for our business we've decided we _always_ want to get an email address from each Customer so AyaNova can send them [automatic notifications](customer-notify-subscriptions.md) so we're going to set the email field to be required for entry.
|
||||
|
||||
Click on the menu button in the top right of the form. We're logged in as a Business Administration role user in [step 1](#1-login-as-a-user-with-permission-to-modify-form-fields) so when we open the menu on a form we see a _Customize_ option:
|
||||
|
||||

|
||||
|
||||
If you don't see a _Customize_ menu option it means you're either not logged in as a User with the [permission](#1-login-as-a-user-with-permission-to-modify-form-fields) to customize forms or you are in a new empty record and haven't opened an existing record as [required for customization](#2-open-a-customer-edit-form).
|
||||
|
||||
Go ahead and click on _Customize_ now to open the [form customization interface](ay-customize.md):
|
||||
|
||||

|
||||
|
||||
In the image above you can see boxes representing each field that _can be customized_ on this form.
|
||||
|
||||
The title at the top of each box shows how it displays in your current language on the form you just came from. Below that is the [translation key](adm-translations.md)
|
||||
|
||||
Fields that can _not_ be customized are not shown on this form. For example the Customer "Name" field is required so it can not be hidden and is not displayed here.
|
||||
|
||||
In this form you can do other things besides require fields for example making a field [hidden (tour)](tour-bizadmin-form-remove-fields.md) or enabling [Custom fields (tour)](tour-bizadmin-form-custom-fields.md).
|
||||
|
||||
For this tour we'll place a checkmark in the "Required" property for the `Email` field and click on the Save button at the top:
|
||||
|
||||

|
||||
|
||||
Now click on your browser's back button to go back to the Customer form and try to remove the email address and save the record:
|
||||
|
||||

|
||||
|
||||
AyaNova won't allow the record to be saved without an email address entered.
|
||||
|
||||
### Other users
|
||||
|
||||
As soon as you saved the customization changes they took effect for all other Users as soon as they next open the Customer edit form. In other words if they were actively editing a Customer they wouldn't see a change but the moment they opened another Customer for editing the change would take effect.
|
||||
|
||||
### Oops!
|
||||
|
||||
You just realized you made a mistake and don't want to require the `Email` field. No problem, just click on Customize in the menu again and remove the checkmark beside the _Required_ property in the `Email` customization box, save your changes and email addresses are no longer required!
|
||||
|
||||
## What about previously entered records?
|
||||
|
||||
Requiring a field doesn't affect any existing records so, in our example, previously entered Customers that don't have email addresses will only trigger the required rule when someone edits them and attempts to save them.
|
||||
@@ -26,10 +26,12 @@ nav:
|
||||
- 'Introduction': 'tour-intro.md'
|
||||
- Business admin:
|
||||
- 'Hide form fields': 'tour-bizadmin-form-remove-fields.md'
|
||||
- 'Require field entry': 'tour-bizadmin-form-require-fields.md'
|
||||
- 'Customize text': 'tour-bizadmin-form-custom-translation.md'
|
||||
- 'Custom fields': 'tour-bizadmin-form-custom-fields.md'
|
||||
- Service:
|
||||
- 'Create a Customer': 'tour-service-create-customer.md'
|
||||
- 'Create a work order': 'tour-service-wo.md'
|
||||
|
||||
- 'Create a work order': 'tour-service-wo.md'
|
||||
- 'Changes from AyaNova 7': 'ay-start-changes-from-v7.md'
|
||||
- User interface:
|
||||
- Introduction:
|
||||
|
||||