-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Hi,
I am trying to change the way the street is displayed using the ParseAddress function as described in the example. In my country the format of the address is streetname + number not number + street. I was going to solve this with following custom script. When I search for an address and click it, nothing happens. When debugging, my code gets executed and gives the expected result. I even get to notifyOutputChanged and there the address looks as expected but no value gets changed on the form. When I remove my script it works (expect for the format).
function getConfiguration(){
function parseAddress(address) {
return new Promise(function(resolve, reject){
if(address.street){
var parts = address.street.split(' ');
// check if first part of address starts with a number
if(parts[0] && /^\d/.test(parts[0])){
// move the housenumber to last element in array
var houseNumber = parts.shift();
parts.push(houseNumber);
// recreate street
address.street = parts.join(' ');
}
}
resolve(address);
});
}
return {
ParseAddress: parseAddress
};
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels