Skip to main content
Question

Loop iteration isn't propagated to the Code input data

  • 20 July 2024
  • 7 replies
  • 21 views

Hello,

I am working on an implementation when I need to pick an item based on the number of the current Loop iteration.

For some reason the Loop iteration isn't propagated to the Code input data.

Here is a screenshot

 

Here is the log

Did anybody face this issue?

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

7 replies

Userlevel 7
Badge +14

Hi @aeremchuk 

Try setting Index as it’s own variable.

Then use the variable in the console.log(), etc.

let Index = inputData.Index;

 

I tried that at the same result.

 

Userlevel 7
Badge +14

@aeremchuk 

Worked for me.

 

Did you test your Looping step before testing your Code step?

 

 

First of all, Sir thanks for involvement.

Yes I did.  To proof that I can refer my initial screenshot where UI shows 1 assigned.

 

 

Userlevel 7
Badge +14

@aeremchuk 

Try adding the missing trailing semicolon ;

 

Try asking AI to generate the Code for you.

 

Try asking ChatGPT to validate and clean up the code for you.

Userlevel 7
Badge +14

@aeremchuk 

Check to make sure there are no trailing spaces after the input value.

 

OK, Hope It could help someone.

It seems like some problem with AI generated steps. I’ve recreated the step from scratch and it works fine.  
Thanks a lot!