Tagged: Custom script, Hide, Show
- AuthorPosts
- 2023-10-04 at 1:42 pm #19250Eddy RappolMember
Hello MyDataMerge,
I’m looking for a Custom script to show or hide the text frame where the placeholder is in. I managed to to that in ‘Process chain’ (Delete frame with placeholder) but I rather want to do that with a Custom script. I have a placeholder <<Show-hide>> and matching Column in Excel with cells Yes or No. With ‘Suppress input on data merge’ I can manage that Yes and No are not shown.
I started with if var [“Show-hide”] ==”Yes”
But I don’t have much experience in script writing.Can you help me with such a script?
2023-10-04 at 2:22 pm #19251PatStaffHi there,
the custom script feature inside MyDataMerge only allows manipulating data, not the DOM inside InDesign. Therefor it is not possible to handle this with MyDataMerges custom script functionality.
The approach with using the process chain is the better one. Why doesn’t that fit your case?
Regards,
PatOfficial MyDataMerge Team
2023-10-04 at 3:06 pm #19254Eddy RappolMemberThe customer has provided a column with Yes and No. I thought it would be easier with a script.
Thanks for the reply
2023-10-04 at 4:06 pm #19255PatStaffYou need ONE setup in the process chain that does what you need with the placeholder (fill it with data). Add a condition to that setup, so it gets only executed if the YES or NO applies (whatever you need). Then just select “Remove frame” in the process chain. So each frame is removed if the condition doesn’t trigger the setup.
Official MyDataMerge Team
- AuthorPosts
- The topic ‘Custom script’ is closed to new replies.