Variable-based image block issue
Looking to achieve:
I have a workflow that involves a loop with multiple variables being updated each time it loops round.
Within the loop I have an image block with a URL link image which itself is a variable. I have a {current_poster} and other variables that get updated for each iteration. The image block should show the {current_poster} which will be different for each loop.
Issue:
I'm seeing inconsistent behaviour. I know the {current_poster} variable is getting updated from the logs, but sometimes the image block shows the image from the previous loop, rather than the updated image. for the current loop.
All the other variables are being correctly updated and displayed, and if show the {current_poster} in a text block it shows the right link. It's just the image block that doesn't show the updated link.
Sometimes, it will fail to update after the first iteration (i.e. it will show image 1 for iteration 1, 2, 3 etc.). Sometimes it will show image 1 for iteration 1, image 2 for iteration 2, but then fail to update so it shows image 2 for iteration 3, 4 etc.
Tried so far:
- Detailed inspection of the variables to confirm they are getting updated correctly
- Deleting the variable in the image block and adding it again
Hope that makes sense.
Any ideas?

7 Replies
That should not be happening. Is the data in an array? Why not use a carousel and show all the posters at once? You can build a custom carousel to do this.
Yes it's in an array. I set the index and then iterate through it so it goes array[0].current_poster, array[1].current_poster etc
I originally tried a carousel but I came across a limitation of some kind so I kind of built my own version of a carousel with an image block and text blocks.
you should do something like this (note the array is in a var named array):
IMPORTANT: array and poster must be defined in VF as vars.
This will allow you to check for the length of the array var to determine if there are more items.
If you want an example of how to do the carousel, I have a template you can have and import into your VF account. Really is pretty easy.
@W. Williams (SFT) thanks. How would I be able to get hold of the template?
@G-Bot Here ya go
BTW, that does not use loops. It builds it all in one go. Way faster and looks cool too 🙂
Thanks. For my scenario, I need the user to go through each item one by one, so your template is not quite what I need. But I might use it in the future. Thanks again