Get session variable in instantiating class


I have a scenario like this:

val scn = scenario(“First Simulation”)
.repeat(11, “fileCounter”){
exec(session => {
val id = session(“fileCounter”).as[Int] + 1
val idString = “”+id+""
session.set(“idString”, idString) })
.exec(new Filtering(Service, “Edit”, “${idString}”).filtering)

and I want to add the counter value of the repeat function to the class instance.
I’ve tried _.get(“idString”).as[String] but it throws an error:

missing parameter type for expanded function ((x$1: ) => x$1.get(“idString”).as[String])

Any ideas?

try session => session.set(“idString”, session.get(“idString”).as[Int] + 1)