Hi,
Capture the value in a variable and check whether the previous value and the current value is same before entering into the text. Put a condition there that if both are different then enter into the text.
So like this it will not print the duplicates.