UX of the action wizard Create Lookup Field incl. Entity

The goal of the wizard is to create a “field” on the current entity (that’s what it is trying to say in its name). That means it needs an entity to which the field would be added.

Let’s say you have an AddressBook entity and you want add a Category field, so the user could specify each contact’s category. As the category should be a drop-down from which the user would pick an item, we need all the lookup stuff.

You right-click on the AddressBook entity and select Create Lookup Field (incl. entity)…

You name it Category.

These are the manual steps the wizard will save you:

  • It first creates the Category entity with fields Id, Name and some other standard fields
  • Then it creates a lookup for the Category entity
  • It will script the Category table into the Deployment model
  • Optionally it will seed data for the lookup table (e.g. example categories)
  • Then it creates a field that references that lookup on the current entity (e.g. AddressBook.refCategoryId
  • Then it scripts the newly created field and database constraint into the deployment model

Without specifying a base entity you would just be creating a plain entity. And that’s what you can do already with New > Data Entity.