Another formula for the road. It purpose is to auto fill missing or unknown Postal Code!
It should work for all entity I think... one can only hope as I use it and test it. Anyway here it is:
1) Require: Real Estate extension or create one or own. It free so just use it!
2) For the field Type, I use a new Option call "City" so it only filter the city instead of searching for bunch of address.
3) All field name should be default.
Code:
ifThen(addressPostalCode==null, // if the Post Code is blank (null)
addressPostalCode= record\attribute('RealEstateProperty', // then write Post code for me by finding the "data" (attribute) from my RealEstateProperty entity name
record\findOne('RealEstateProperty', 'addressPostalCode', 'asc', 'type=', 'City', 'addressCity=', addressCity), // Search for it by using findOne and it will return an ID, search it by find the type to be City only, and the City name is the same.
'addressPostalCode') // write in data in my field postcode.

Leave a comment: