Smart data retriver

Hi! I have a question, does anyone know if the following is possible: On my app i have a page where you need to fill in pre determent data; for example: First you select your city from a list, after that you select your street. The problem is that the app will show all the streets from all the pre determent city's, so you will have to browse a big list. Is there a possibility to make the app smarter by letting it only retrive the streets frome the city that you choose instead of the streets from all the city's?
2 answers

You need to:

  1. Create a non-persistent entity with a city field with the same type of your address’ city field (Enumeration/String/association). Let’s call the entity: Search
  2. Insert a dataview in your form whose datasource is a workflow whose output is a Search record
  3. The workflow must instantiate a Search record and link it to your page parameter
  4. Insert and Address.street fields inside the Search Dataview
  5. Add an XPath in Address.street’s selectable object that only displays Street where city=$CurrentObject/city

Hi Lucas,

There are multiple ways to do this and it depends on how the domain model is setup:

  • Option 1 – Assumption is that City and Street has 1-* association.
  1. Add a dataview on the page which listens to the widget. The widget is a list of City
  2. Inside the dataview add a datagrid that will retrieve all streets over a city (database over association).
  3. Process as required



Hope this helps