in short, suppose you have a Student entity with attributes Id, Name, Email. In a form, suppose you want that when the user types the student Id, then the fields Name and Email are automatically filled with the database content.
To do so, define the Student entity with those fields, define a page, and define inside the page a form unit with fields Id as the entity key, Name (make it Preloaded and not Modifiable) and Email (make it Preloaded and not Modifiable). Don't forget to set Landmark checkbox, for your test.
Outside the page, add a selector unit upon the Student entity, name it StudentDetails, and add a KeyCondition.
Now, add a flow from the Student form to the StudentDetails selector, and name it searchDetails. Open the binding form, and bind the field Id to the Key Condition. Then add an OK Flow from the StudentDetails selector to the Student form, and bind name and email.
Finally, click the Id field of the form, in the Outline view, and in the Ajax tab in its Property view check Enable Event, keep On Change() as the Event Type, choose searchDetails as the Event Flow. Optionally, check Event Indicator.
With some external tool, insert some record in your Student table of your DB.
Generate and run your project. When you type a student Id and you click outside the field (i.e., you fire the onChange() event), name and email are retrieved from the DB.
As a different choice, you may want to make the Id field ad a selection field (instead of a field) preloaded with Id's from the database; the rest is exactly the same. To do so, right-click the oid field, choose Refactor to a selection field. Inside the page, add a selector unit upon the Student entity. Add a flow from the selector and the form, and bind the Id from the selector to the one from the form.
Generate and run. Now student Ids cannot be typed, but can be chosen from a list. Choose one, and the corresponding name and email are loaded in their fields.