0 Replies Latest reply on Nov 8, 2018 5:00 AM by Kasyan Servetsky

    Is it possible to activate a record in data merge by script?

    Kasyan Servetsky Level 5

      Hi forum,

      I am new to data merge so can be missing something obvious.

      Here I posted the whole script and the test file, in case someone would like to play with it.

      It exports multiple pdf files using Data Merge feature: each record corresponds to a specific language.

      The problem is that for the last language in the chain – Hungarian – it should execute another script (via doScript) which runs a few find-change queries. (Both scripts should be located in the same folder.) But before that I should activate the record 3 (for Hungarian)

      Manually, I just turn the Preview on and select, say, record 3, but I can’t find the scripting equivalent for these two steps.

       

      I tried the following trick, but it didnt work:

      I made Hungarian the 1st language to be exported in the code.

      2018-11-08_13-07-07.png

      Activated manually Preview and selected the 3rd record

      2018-11-08_13-24-15.png

      But this resulted in an error on export command:

      2018-11-07_14-09-34.png 

      Obviously, the same happens with hidden panel.

      I tried to cheat it and turned Preview off leaving the 3rd record active, like so:

      2018-11-08_14-46-10.png

      But this also resulted in the same wrong output as before.

       

      As far as I understand, the only option is to split this script into two: one for Hungarian and another for the rest of languages.