Copy link to clipboard
Copied
I'm doing a Data Merge and based on the contents of a data placed in a text box I want to turn off/on certain layers?
Is this possibily?
Thanks in advanced
Copy link to clipboard
Copied
This is not possible with just the data merging feature.
It is recommended to use scripts together.
Copy link to clipboard
Copied
No, I don't think that is possible. This would require some scripting, we could either create a script that compliments the native data merge functionality or design a custom data merge based on how much custom control is needed for the workflow
-Manan
Copy link to clipboard
Copied
Yes, the solution is to name the placeholder frames on the DataMerge template and then execute a script on the merged document. However, toggling layers based on each record's contents likely will not achieve the desired result. You'd need to toggle visibility of individual page items on each page, I'm thinking.
Copy link to clipboard
Copied
Not possible directly...
One workaround is to export to PDF each of the Layer separately, than add them in the database to place them in a frame in your document. Easy, fast!
Copy link to clipboard
Copied
I think turning on and of layers based on an item in a single record would be dangerous. It will not affect the selected item, but the whole document and you get surely unwanted results.
No, it is not possible.
Copy link to clipboard
Copied
You're right, turning off layers is probably not the right approach. But you can certainly toggle visibility on distinct page items and/or remove page items on other layers per page based on a page's contents. Never say never; just about anything can be done via automation. It's just about finding the right solution to the problem.
Copy link to clipboard
Copied
IMHO the best way (price/time/result) is:
Classic datamerge and then use this script:
https://corullon.com.br/scripts/product/apply-objstyle-by-search/
Example:
Find (dog|cat|rat)
And apply object style with zero transparency on every text frame that contents dog, cat or rat.
Copy link to clipboard
Copied
May want to check out a third-party plugin such as DesignMerge.