Hi,
I have a template were there is an address box which appears in the envelope window and another text box which contains the property address on another part of the template, what I need to do is if the property address box fields are empty on some letters then put the address from the other box in it keeping both
my fields are as follows, address box in envelope window
Add1
Add2
Add3
Add4
Add5
Add6
Address in property box
Property1
Property2
Property3
Property4
Property5
Property6
Unless your Template is very complicated, it is simply a matter of checking the content of your Property field using a script.
This can be achieved in your Datamapper where you would fill the Property fields with those of the Addresses fields when those of Property are empty.
It can also be achieved in your Template when you are using script for your placeholder. You check if the fields for Property are not empty and if they are, you use the values from the Addresses ones.
I tried to do it in the datamapper using an action after the extraction but I could not get it to work using and tweaking the information that marten and Phil posted from these threads
I will have another look in the template script and see if I can work out how to do it in there
Can you anonymized your Datamapper and share it?
If not, send me a private message and I will give you my email address so you can share it with me and i will look into it.
There are multiple ways to do this. In Designer you could use a single script that calcs the length of your Add fields and based on the outcome copy the contents of the box holding the main address to the Add box. It could look something like this:
The box on the left is my Add box (I assigned an ID called ‘add’) and the box on the right holds my main address (has an ID called ‘main’). I’m using query(‘#main’).html() to retrieve the contents of the main box.