The TagInput widget allows a user to select multiple choices from a lookup list. The input is done with a keyboard. When the user starts entering a text, the drop-down part appears and allows selection of a value.
The best use for a TagInput are long lists of values. If you have only a short list of possible values and you need to select multiple entries you should use a Checklist.
Since ORIGAM data storage is based on standard relational databases, it typically does not allow storing multiple values in a single database field. Therefore we use the most transparent way on storing TagInput choices-a child table.
As the first step, create a child N:N entity that will contain a reference field to an entity from which you would like to pick-up values.
For example: Countries.
Then you have to create an Array type field in the main entity.
- Right-click on the entity and select New > Virtual Field
- In the ArrayRelation select the child entity (e.g. CountriesEntity)
- In the ArrayValueField select the field you will fill-in by selecting values from the TagInput widget (e.g. refCountryId)
- Caption, DataType and DefaultLookup should be automatically filled based on the selected field.
Now when the data model is ready (an array field in the main entity is prepared) we will finally put the TagInput widget to our main entity’s screen section.
- Open the desired screen section
- Click on the array field from the list of fields
- Select the TagInput widget from the list of widgets and drag-drop it to the surface.
- Check if the DataLookup property is entered.