2019-02-06 at 11:03 am #7359ecmessMember
I’m using Indesign to create letters using data merge. I have always used Word for that but we switched to Indesign
Is there feature “If Then Else”, which gives out variable text based on whatever is in the datasource. For example, If there is a column “City”, can i setup a specific output for “Toronto”?2019-02-06 at 11:03 am #7360PatStaff
Hi ecmess and welcome to the support forum,
a few more questions.
- Is “Toronto” in your database?
- Do you want to output specific data when “Toronto” matches?
- Is that output also in the datasource, same row as “Toronto”?
Official MyDataMerge Team2019-02-06 at 11:04 am #7361ecmessMember
Hi, wow – very fast response.
2019-02-06 at 11:04 am #7362PatStaff
- Yes, Toronto is in the database in a psecific row
- Yes it is, in another field “Description”
Yes that should work. This solution assumes that you know the basiscs in MyDataMerge – like preparing your layout and importing it to MyDataMerge.
- Import your layout and datasource
For the placeholder that should take the description, do the following:
- Open the editor
- Activate the generation chain. (chain icon).
- Add a new setup called “Toronto” (name doesnt matter, its just to keep it clear)
- In the generation chain box, move the “Initial setup” to the left so there is only the “Toronto” Setup in the processing table
- Add a datasource element to “Toronto” setup and select the “Description” colum
By now this will put out EVERY description. To trigger it only for “Toronto”, open the conditions (next to the chain icon) and do the following: Setup a condition with parameters:
- “All of the following are true”
- “City”is “Toronto”
Then this setup will be only triggered if that condition matches.
But now this will only work for “Toronto”. We do not have a standard setup. Therfore, go back in the generation chain and pull “Initial setup back on the right, BELOW “Toronto”.
This way – if “Toronto” is not triggered, it will continue with the initial setup. Add some content to the “Initial setup” and test it.
Official MyDataMerge Team2019-02-06 at 11:04 am #7363ecmessMember
Thats easier than i thought. I renamed the setup to cities and added the other cities to the conditions too!
Thanks a lot2019-02-06 at 11:04 am #7364PatStaff
Glad we could help. Just let us know if there’s anything else you need to know.
Official MyDataMerge Team
- The topic ‘Data merge with conditional output’ is closed to new replies.