How to get next request name or id

I have 4 requests with names request1,request2, request3 and request4 in this order.

I want to create a workflow where after each request 4 is called, so the workflow would be

request1
request4
request2
request4
request3
request4

so whenever I run a request I store the request name to a variable.

pm.environment.set(“requestName”, pm.info.requestName); (Say i get request1)

Then call request4 using sendNextRequest(“request4”) ,

Now in request4, I want to do something like

sendNextRequest(pm.environment.get(“requestName”)+1) so that it will call the next request (say request2)

is there a way to do this

@praveendvd0pravu Yes, you can write the following to access the name of saved request:

let name = request.name;