The Label Selector widget enables easily creating objects, assigning objects to other objects, and removing objects (for example, labels) from other objects.
It features both an input box for searching and creating objects and a drop-down menu for selecting objects that already exist . The implementation is based on the Tag-it library.
You configure background colors for labels and how the text contrasts with a label background via the
1.1 Typical Usage Scenario
- Quickly adjust reference sets
- Easily create new objects to add
- Label Object – the entity used for the labels combined with the reference set from the context object
- Caption Attribute – the attribute of the label entity to be used as the caption
- Color Attribute – the attribute of the label color (optional)
- Label constraint – the constraint for the labels
- After create label – the microflow to be triggered after a new label is created and committed; this microflow receives the data view object
- On change microflow – the microflow to be triggered for every add and remove
To implement this widget, follow these steps:
- Download the Label Selector widget into your app project via the Marketplace in Studio Pro.
- Create a persistable entity named Label.
- Add two attributes to the entity named Caption and Color.
- Add a many-to-many association with dual ownership between this new entity and the entity that you want to label.
- Add any necessary access rules to the new entity.
- On a page with a data view of the entity that you want to label, add the widget to this data view.
- On the widget properties Data Source tab, set Label object to the Label entity, Caption attribute to the Caption attribute, and Color Attribute to the Color attribute.
- On the Behavior tab, set Show Labels to Yes.
The label functionality is now operational. To more fully use the widget, do the following:
- Create overview pages for the Label entity so that you can maintain the label, modify the colors, delete duplicates, and perform other tasks
- Improve the interaction by creating microflows for the After create label and On change microflow widget properties