Skip to content

Autocomplete field

This field type gives suggestions to the user, based on the field label of the referenced document. It works in a similar way as a Reference Field.


The differences between a Reference Field and an Autocomplete field:

  • The AutoComplete field persists the label of the referenced document. This in opposition to the reference field type that stores the referenceId to the document. In other words; there isn't a link between the Autocomplete field and the referenced document.
  • The AutoComplete field allows free textual input.

Properties

Setting Required Description
Label Yes The label is used for users of BizzStream. The label is shown in documents left to the value of the field. Labels can always be edited.
Translation key No Can be used to replace the field label with a translation. If set, BizzStream will try find the translation associated with the key set in this field. If no translation can be found, the label set in the Label field will be used.
Name Yes The name is a BizzStream system field. Once the Document Definition is persisted, this field cannot be edited anymore. Unless there are no documents based on this document definition.
Required No By checking the required-option, you force the user to fill out the field. By not checking this option, the option to fill out the field is to the discretion of the user.
Reference type Yes This field dictates whether there are references to one or more documents. If you refer to only one document you have to choose the one-on-one (1-1) option. If you refer to more documents please choose the one-to-more (1-N) option.
Related Document Yes Choose the Document Definition you want to refer to. Note that you can’t remove a Document Definition if it’s referenced to by another Document Definition.
Reference Label Yes The reference Label dictates how a label is set up. You can specify the field from the Document Definition you are referring to. You can use a BizzStream Expressions to set this up. For example you can use {!target.name!}
Filter No It is possible that the document to which you refer has to meet certain criteria for its characteristics. You can force this by using a filter. This field can contain BizzStream Expressions. For example you can use {!target.projectName!} == {!source.projectName!}
Search Method Yes The 'Search Method' refers to how you search for the reference field. The options are contains, begins with and ends with
Sort Field No Select the field that is used to sort the suggestions. By default the suggestions don't get sorted.
Sort Order No Select here whether you want to sort the suggestions ascending or descending.
Allow free input No Enables the user to input a value that does not have to exist in one of the related documents. If this field is unchecked the input values of this field will be validated against the possible values that can be found in the referenced documents. Moment of validation is upon document save.
Validate Reference Field No Because sometimes it's unnecessary to validate all reference fields in a document when the document is saved, you have the option to validate only the fields that actually have been updated.
When a Related Document is deleted Yes When a Related Document is deleted you have three options
1. Prevent Deleting: the referred document cannot be deleted.
2. Delete this Document: the document that contains the reference will be completely deleted.
3. Delete Reference: the reference to this document will also be deleted.
Initial Value No By providing an initial value to the field, upon creation the field or linefield will have this value. This field cannot refer to values placed in other fields. A user/visitor can overwrite this value.
Initial Placeholder No When you provide an initial placeholder, the field will get the value of the field to which the placeholder refers. Users/visitors can update this value. Unlike placeholders, the field will not updated when the field to which the placeholder refers updates. This field can contain BizzStream Expressions referring to other fields.
Placeholder No By providing a placeholder, you ensure that the value of this field is replaced by the value of the field to which the placeholder refers when the referenced field updates.

How the data is stored

Autocomplete fields will be saved accordingly in the database:

A one-to-one (1-1) reference is saved in the database by using the label of the referred field:

AutocompleteField:"Maxedy"

A one-to-many (1-N) reference is saved in the database by using the labels of the referred fields:

AutocompleteField:["Maxedy","VMA"]

QR codes in mobile reference and autocomplete

In some cases, reference fields may point to documents that have reference labels that are very similar (say a 10 digit identification code). If users enter this code manually, there is a high risk of typing errors. This can be reduced by completing reference fields by scanning a QR code.