Skip inside the for each loop

Hi All,

Consider a scenario where  ,I am looping on an array of 100 values.

I got the value which i was looking at the index of 20 . then i need set 2 variables with predefined values and skip rest of the looping in for each.

Could you please let me know if it is possible ? sample code is really appreciated .

Thanks in advance

Raj

  Discussion posts and replies are publicly visible

Parents
  • HI Raj,

    1-> one statement is not clear here : "hen i need set 2 variables with predefined values " .

    2-> if you want to skip the loop or simply i say you just want to terminate the loop like we do in java/c# with the help "break" keyword that is not possible in Appian loop till now.

    3-> And if the requirement is like you want to replace some value( the index which you don't know) in array but you don't know the index then you can use wherecontains function , it will return you the index for the value which you are searching and now you have the index value so you can do further process.


    Regards
    Abhay Giri
Reply
  • HI Raj,

    1-> one statement is not clear here : "hen i need set 2 variables with predefined values " .

    2-> if you want to skip the loop or simply i say you just want to terminate the loop like we do in java/c# with the help "break" keyword that is not possible in Appian loop till now.

    3-> And if the requirement is like you want to replace some value( the index which you don't know) in array but you don't know the index then you can use wherecontains function , it will return you the index for the value which you are searching and now you have the index value so you can do further process.


    Regards
    Abhay Giri
Children
No Data