'looking for a sequential function in Jmeter to run the variables values in order?

I am looking for a method or a function in Jmeter to run sequentially values from User-Defined Variables in every payload. Since I am using ${__RandomFromMultipeVars(value1,value2,value3,value4,value5)} but the Random function only executes random values, I need a method or functions to run the values in sequence in every payload like in the first payload run value1, Second payload run value2, and the third payload run value3, etc.



Solution 1:[1]

ForEach Controller

enter image description here

Another use case is run a Sampler for each match of a Post-Processor like it's described in Using Regular Expressions in JMeter article

Solution 2:[2]

Use extended CSV dataset config plugin

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dmitri T
Solution 2 rollno748