Auto Attach Picker¶
Auto Attach Picker is a Lime package designed to auto-populate fields in the front-end based on changes made in the card form. This feature provides users with a clearer visual representation of the values that will be set in the front-end, offering better insight into which values will be saved—before actually saving.
Configuration¶
This section describes how to configure Auto Attach Picker. You will need to configure:
Web Client Views¶
To configure Web Client views, use Lime Admin to add the component for each field you want to inherit values from.
The component is called lwc-limepkg-auto-attach-picker-card
, but should be visible as an example as Auto attach picker
in the search bar.
- Configurable for each field on which the component is set.
- Configurable to prompt the dialog when clearing or overwriting values.
- Supports displaying other web components, such as hierarchy-picker or limeobject summary.
NOTE: Not every component has been tested, and this package may not support every component.
Example Configuration¶
To make the configuration work properly, the property inheritTo
must be defined.
The component is not visible on the card itself. In this example, the component is applied to the field Hyreskontrakt.
inheritTo
expects a JSON object where the key (left value, e.g., person
) is the property on the current card.
inheritTo : {"person" : "<path to person>"}
The path is written in dot-notation and starts from the field where the web component is set.
In the example above, we are creating a new ticket and want to inherit the person
field from the leases (hyreskontrakt
) company's related object.
We configure this by adding the web component to the field lease
and setting inheritTo
as follows:
{ "inheritTo": { "person": "object.company.person" } }
If we then pick a value for lease
, the person will be fetched from object.company.person
Another example, where we have multiple properties set, the configuration can look like this:
Note that we have chained another component, LimeObject summary, that will render in the card view for this field. The configuration for other component is inherited from that specific component.
The current example is works as follows, and when we pick a contract, the card looks like this:
If we then remove the contract, we will be prompted if we should clear the values we just picked:
Here, we can choose whether to clear all values, clear the value we removed, or cancel. In this example we get prompted because we checked "Remove related values" , and "Prompt the user when clearing values".