What Are Parameters?
Last updated
Last updated
In some situations we're using parameters. Events, Actions, Forms - parameters are everywhere, and sometimes we can be confused with them. Let's explain.
E.g., we have a form that is shown in the some page.
In order to let system know which form should be displayed, and in which mode, a page passes several parameters to the component that displays a form. Some of these parameters are system and always passed, and some of them are custom and configured on the page layout by it's author.
These parameters are available in the form as a $FormParameters
context object. This context object works with parameters that are given to the Form by things which called this form - actions, pages, components, etc.
From Builder knows nothing about what Form can be called from, so, each time we should ourselves type/paste names of custom parameters in field picker to get a Merge Field to work with:
To add more interactivity to the forms we can trigger some Actions on button clicks, field changes, etc. These actions may pass some parameters to the objects they work with (records, components, forms, kanbans, etc). And these actions also may accept their own input parameters.
Form Parameters: These are used to capture user inputs on forms. Each field in a form has a corresponding parameter that stores the user input.
Action Parameters: These are used when triggering actions. They define what data is passed to the function or method being called.
Event Parameters: These are used to handle events, such as clicks or hover actions. They contain data about the event, including the element that triggered the event and any additional data.
Understanding the role of each type of parameter is crucial for effective application development.