Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Goal

You want to derive part of your model from an external source. For Instance you would like to determine the street name and town based on the postalcode postal code and housenumberhouse number

Ingredients

  • Entities
  • Attributes
  • CSV Wizard
  • CSV File
  • Data rule
  • Page
  • Flow

Recipe

Step-by-step guide

To use Use a data rule to derive information for one or more attribute values follow these steps:

Table of Contents
minLevel3

Create a domain

The following domain model displays a Person and Address Entity.Image Removed

Image Added

Select a CSV file

We will use the a CSV file that has a list of all available adresses addresses to load the street name and town based on the postalcode postal code and town

StreetHousenumberPostalcodeTown
Veemarktkade85222 AEs-Hertogenbosch
Reitscheweg555232 BXs-Hertogenbosch
Wolvenhoek15211 HHs-Hertogenbosch
Verwersstraat415211 HSs-Hertogenbosch

...

Use the CSV wizard

You can use the CSV wizard to create a datarule data rule that uses a CSV datasourcedata source

 

  • Select the Connectivity tab.
  • Select CSV Wizard.

    Image Added

  • Select Data rule.
  • Select create new resourceCreate new resource.
    • If you would like to manage the CSV file outside Blueriq, check the box 'Is external'. Now, the imported text file will only be used as an example for configuration of the resource. 
    • For configuring this resource in Runtime, see Global: Resource
  • Enter a name and select a CSV file.
  • Select the format settings.
    Image Removed
    Image Added
  • Enter the selection criterea criteria and goals.
    Image Removed
    Image Added

  •  Finish Finish the wizard, a new data rule is created

...

  • .

To test your datarule data rule create a page that contains al all attributes. Make sure that you add a refresh to the attributes that are used as input (postalcode, housenumber) and ensure that the attributes that are used as goal (street and town) are set to read-only.

...

CSV used in the example project: PostalcodeTable.csv
 

UI Expand
titleRelated articles

Content by Label
showLabelsfalse
max5
spacesshowSpaceBKBfalse
sortmodifiedshowSpacefalse
reversetrue
typepage
cqllabel in ("rule","datarule") and type = "page"
labelsdata-rule rule, datarule