Copy link to clipboard
Copied
Hello,
I'm trying to use a spreadsheet to replace text in a MOGRT. When I run the following script, it changes just the text using the spreadsheet just the first time since the "replace Ae Mogert text" is pre-defined. After that, the script cannot find the new text, because it was already changed to the data from row 2 in my spreadsheet.
I tried to add another "replace ae Mogrt text" block after the "add to Adobe Media Encoder queue" to convert the text in the Mogrt back to the same value it started with, but that didn't work either.
Does anyone have any ideas or suggestions?
Hi Lawrence,
I think the issue is that all sequences you create have the same name. If two sequences have the same name and are located in the same bin, then Automation Blocks cannot distinguish them. Therefore, it can happen that it always manipulates the same copy, and leave the others untouched.
Things to try:
- inside the Clone Sequence block, create the new sequence path with the Text Pattern block in order to give each sequence a unique name. If you set the text to "new bin\sequence-$1"
...Copy link to clipboard
Copied
You could create a new duplicate of the sequence each time you want to create a new variant. Then you replace the texts only in that duplicate and keep the original sequence with your placeholder names unchanged.
Another alternative is the method described in this tutorial:
https://docs.mamoworld.com/automation-blocks/tutorials-pr/mogrtFromSpreadsheet
It avoids using the replace Ae Mogrt Text block entirely and instead uses the Set Clip Parameter Value block, which can set the value no matter what the current value is.
Copy link to clipboard
Copied
Thanks so much for the suggestions! I tried everything you provided over the past week and I can't seem to get the desired route. Ideally, I would use the deuplicate sequence method.
Here's what I created using the reference materials provided. I added notes to describe what I intend to happen.
The end result is that the sequences are duplicated successfully, but the final exports have have the same value from row 2 on my Smartsheet. It never advances to the next row.
Copy link to clipboard
Copied
Hi Lawrence,
I think the issue is that all sequences you create have the same name. If two sequences have the same name and are located in the same bin, then Automation Blocks cannot distinguish them. Therefore, it can happen that it always manipulates the same copy, and leave the others untouched.
Things to try:
- inside the Clone Sequence block, create the new sequence path with the Text Pattern block in order to give each sequence a unique name. If you set the text to "new bin\sequence-$1", for example, and then replace $1 by the variable "Promo", then for each duplicate the content of the variable Promo will be included in the sequence name - and hence if the Promo value in the spreadsheet is unique, the sequence name will be, too.
- before the replace Ae Mogrt block, insert some write to console blocks to output the values of the values of the variables "active sequence" and "Promo" (maybe in combination with the Text Pattern block, to output all of them in a nicely formatted message like "set in sequence $1 text Promo to $2".
Then you can verify with that output, which sequences are actually manipulated in each loop and which value Promo is used for that. This kind of output is always helpful to verify step by step if the script is doing what you expect it to do.
Copy link to clipboard
Copied
You're a genius, Mathias. The best developer I've ever had the pleasure of working with. Thanks so much!
Copy link to clipboard
Copied
Another option is to create a new duplicate of the project for each variant.
See "Batch Create Projects" here: https://docs.mamoworld.com/automation-blocks/tools-pr/templateTools#batch-create-projects
Find more inspiration, events, and resources on the new Adobe Community
Explore Now