When customizing a screen in the App Builder, you will find most input components have the option for its Data source to be:
Manual: value is not automatically fetched or updated.
Mapped: value is bound to a field of a table.
This includes the following components:
Checkbox
Date time picker
Dropdown
HTML Editor
Image
Label
Text area
Text Input
Toggle
Mapping overview
Before we can cover the difference between a manual data source and a mapped data source, we need to cover how screens in Method work.
Screen overview
Screens created in Method are specifically designed to create and edit one record of a table. This is why every screen requires a base table. In the below image, the base table for the screen is shown in the Screen properties.
However, it can be, and often is, used for other purposes. A screen can be used to display a grid, show a chart, or do batch updates. Notice how, in those cases, multiple records are being referenced, not just one record. And in those cases, it does not matter what the base table of the screen is, nor is it necessary to use mapped data sources.
In other words, the only time you need to map the data of an input component is when the purpose of the screen is for creating and editing one record in the base table of the screen.
Mapped components are directly connected to the base table
The below image shows a simple screen used to create or edit on record within the Activity table.
The dropdown component and the Comments component are mapped to their appropriate fields within the Activity table. As shown above, the Comments component is mapped to the Comments field in the Activity table.
In order for the screen to manage a record, it will need a Record ID, and this Record ID is stored in a session value called the Screen Active Record ID.
By default, the Screen Active Record ID is set to -1. No such Record ID exists (they are all above zero), so nothing happens to the mapped fields. They remain empty.
However, if the Screen Active Record ID is set to the Record ID for a record that exists in the table, then the mapped components will automatically show the values from that record. In the below image, the Screen Active Record ID is set to an existing activity.
Mapped components save with a Save All action
When creating a screen that manages a single record, there will be a button component to Save the record. And in the button's click event will be the action: Save All. (There may be more actions, but you will have the Save all).
The Save all action will save all mapped components to a record.
If the Screen Active Record ID is not set (default being -1), then a Save all will create a brand new record populated with the values from the mapped components on the screen. (Furthermore, the Screen Active Record ID is instantly populated with the Record ID of the record that was just saved.)
If the Screen Active Record ID is set to a value, then the associated record will update with the values in the mapped components.
Manual components
Manual components will not automatically save data to the base table.
Pulling from the same example above, the Label holding the text "Activity" has its Data source set to Manual.
This text, "Activity", will not save to the record since it's not mapped to a field where it could save to.
Is there a purpose to an input component, say the Text Input component, if it's not mapped and set to manual?
Yes. What if you wish to save the values to a completely different table? The Save All action is useful for a quick save to the base table, but if you need to save to multiple tables on the screen, you will want to use unmapped components, and utitilze the Insert Record into Table or Update Fields in Table actions.
Automatically mapped input components
The following components will automatically be mapped and saved with the record of the base table:
Tag list
Attachments
Signature





