case 4212

This commit is contained in:
2022-11-02 00:29:54 +00:00
parent 1a479a2dfe
commit 697abe5b00
7 changed files with 54 additions and 82 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -1,6 +1,6 @@
# Guided tour: Customize displayed text
In this guided tour we'll change the default title text that displays for some fields by changing their Translation.
In this guided tour we'll change the default title text that displays for a couple of fields on the Customer form by changing their Translation.
The same technique you learn here applies to any other type of form in AyaNova.
@@ -28,18 +28,26 @@ If you are using generated AyaNova [sample data](ay-evaluate.md#generating-sampl
## 2\. Create a company standard translation
The stock translations that come with AyaNova are read only and can't be modified, instead you create a _copy_ of a stock translation and modify _it_ instead.
The stock translations that come with AyaNova are read only and can't be modified, so in order to customize a Translation you create a _copy_ of a stock translation and modify the copy instead.
Usually you want all Users in your company to be using the same Translation so it's commone practice to make a default standard company Translation that _all_ Users will be set to use.
Let's go ahead and make a new company standard translation that all our Users will be using.
### Navigate to the Translations table
The first step is to go to the Translations data table:
![translations navigation from admin navigation pane](img/tour-nav-biz-admin-translations.png)
Here we can see the stock Translations that come with AyaNova and no other custom Translations yet:
![translations](img/tour-biz-admin-form-custom-translation-1.png)
In the image above we can see the stock Translations that come with AyaNova: "de" for German, "en" for English, "es" for Spanish, and "fr" for French. The two letter names of each stock Translation are the standard international language codes and recognized by users of those languages.
The image also shows that we have no other custom Translations yet.
### Duplicate a stock translation
A new custom Translation is made by copying an existing stock translation.
We're going to modify one based on English so let's open the stock English translation by clicking on it's name in the table "en":
@@ -58,47 +66,63 @@ The server has automatically named it "en-1", let's go ahead and rename it to so
## 3\. Customize text
Our company doesn't need an "Account number" field for our Customers but we _do_ need a "File number" so that's one change we're going to make, also we don't need a "Pager" phone number but we do need a "On duty contact" phone number.
Our company doesn't need an "Account number" field for our Customers but we _do_ need a "File number" so that's one change we're going to make, also we don't need a "Pager" phone number but our company provides service for many critical infrastructure customers so we do need a "Emergency contact" phone number for the customer's on duty emergency contact phone for emergency service.
Translation items have a "Key" property that is fixed and not editable and is used by AyaNova internally to identify fields and a "Display" property that is set to the text that will be displayed to the User in the AyaNova user interface and on reports.
The Translation form has two columns for these properties and we need to find the Key we want and then click on the text in the Display column to open an editor and change it.
If we don't knwo the key we can find the exact Key used by opening the Customize menu option in any form to display the list of fields, the key name displays there under the title of displayed to the User, but we can also just do a search for the text we want to change which is often faster.
We can find the exact Key used by opening the [Customize menu option](ay-customize.md) in any form to display the list of fields that are customizable, the key name displays under the title of displayed to the User, but we can also just do a search for the text we want to change which is often faster.
We know we want to change the text "Account Number" in the Customer form field as it's displayed to the User ====CHANGE THIS DUE TO BUG==== now so let's just type in "Account number" in the search box and see what comes up:
We know we want to change the text "Account Number" in the Customer form as it's displayed to the User now so let's just type in "account" in the search box and see what comes up:
![translation key search](img/tour-biz-admin-form-custom-translation-5.png)
Here we can see all the places in AyaNova that the text "account" is displayed and the third one listed has the key "CustomerAccountNumber" (notice the search is not case sensitive and we ordered by the Key column by clicking on the Key column header).
Here we can see all the places in AyaNova that the exact phrase "Account Number" is displayed and the first one listed has the key "CustomerAccountNumber" (notice it's not case sensitive as we used a lowercase n for Number but it matched anyway).
All keys start with the object they are referring to so we know this is the one we want to change.
All Translation key names start with the name of the object they are referring, in this case it's "Customer" so we know this is the one we want to change.
Click on the text "Account number" in that row to edit what is displayed and change it to "File number":
![translation key change](img/tour-biz-admin-form-custom-translation-6.png)
Click on OK to confirm the local temporary change and then also go ahead and click on the Save button at the top of the form to save the change to the server.
## 2\. Open a Customer edit form
Now type "pager" in the search box to locate the "Pager" phone number field and you'll see it's internal Key name is "CustomerPhone5".
For this tour we're going to modify the Customer form fields so let's take a look _before_ we make the changes:
We'll click on the "Pager" display text and change it to "Emergency contact", click on OK to accept the changes and then save the form again to send the changes to the AyaNova server.
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.
Now it's time to set our own User account to use the new Translation so we can confirm it looks how we want before we have other Users switch to this new translation.
### Click on the "Hamburger" icon
## 4\. Set our User account to the new Translation
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.
Users in AyaNova can select their own Translation from their [User settings](home-user-settings.md) form in their Home screen, an Administrator can also set it for them by going to the [Administration Users](adm-users.md) form and opening and editing their User account for them.
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:
We'll change it for our own currently logged in User first to test it out.
![hamburger](img/tour-nav-hamburger.png)
From the navigation pane click on Home then User settings:
Click on the hamburger icon to show the navigation drawer.
![nav user settings](img/tour-nav-home-user-settings.png)
Here we can see that for this User the current translation is set to the stock English or "en" translation:
![translation stock](img/tour-biz-admin-form-custom-translation-7.png)
We need to change this and select our custom translation we made in step 2:
![translation new](img/tour-biz-admin-form-custom-translation-8.png)
And then save our User settings using the Save button at the top of the form.
The moment we saved our change to the new Translation, AyaNova automatically downloaded and switched our local User account to use the new Translation selected so we can now go to the Customer form and confirm our changes have taken place.
## 5\. Open a Customer edit form and confirm changes
Navigate to an area of AyaNova where Customers are displayed in their data table.
### 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.
In the image below you can see the options available to the sample "Business admin" User generated by AyaNova.
![nav drawer for biz admin](img/tour-bizadmin-form-remove-fields-1.png)
@@ -106,78 +130,26 @@ The area we want is "Customers" and the sub item also "Customers" so go ahead an
![customers data table](img/customers.png)
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).
![customer edit form](img/tour-bizadmin-form-remove-fields-2.png)
### Confirm changes
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.
![translation done](img/tour-biz-admin-form-custom-translation-9.png)
## 3\. Customize text
In the image above we can see our changed field titles in the Customer edit form.
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:
We're happy with these changes and want to roll them out to all Users so the next step would be to either have Users go into their own home User settings and select the new Translation or do it for the User's from the [Administration Users](adm-users.md) form and opening and editing their User account for them.
![customize menu option](img/tour-bizadmin-form-remove-fields-3.png)
### Future changes
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-translations) 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).
Once Users are set to the new company standard Translation, if you make any changes to _that_ Translation you will personally see them take effect immediately when you save them because AyaNova will update your local Translation automatically in the browser from where the change is made, however, other Users won't see those changes until they log out and back in again to reload the entire Translation.
Go ahead and click on _Customize_ now to open the [form customization interface](ay-customize.md):
### Reports
![customize form](img/tour-biz-admin-form-custom-fields-1.png)
Our stock reports use Translation keys for field titles just like the forms do, so reports will automatically show the new Translation.
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.
Reports automatically use the Translation that the User is set to use in the AyaNova user settings.
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.
![customizing](img/tour-biz-admin-form-custom-fields-2.png)
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:
![initial customer edit form](img/tour-biz-admin-form-custom-fields-3.png)
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:
![translations navigation from customize menu](img/tour-biz-admin-form-custom-fields-4.png)
Or by using the Navigation drawer to go to Translations:
![translations navigation from admin navigation pane](img/tour-nav-biz-admin-translations.png)
We are now at our Translations data table and can open our custom translation we created earlier for all our Users.
![translations navigation from admin navigation pane](img/tour-nav-biz-admin-translations.png)
### 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.
If you have made your own reports or customized existing ones we recommend using the [Translation Helper](ay-report-edit.md#translations) as we have done with the stock reports so that your Translation changes will automatically be picked up by the report rendering engine and you won't need to edit those reports by hand to make the same changes.