Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #19250
    Eddy Rappol
    Member

    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?

    #19251
    Pat
    Staff

    Hi 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,
    Pat

    Official MyDataMerge Team

    #19254
    Eddy Rappol
    Member

    The customer has provided a column with Yes and No. I thought it would be easier with a script.

    Thanks for the reply

    #19255
    Pat
    Staff

    You 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

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Custom script’ is closed to new replies.