Is it possible to use for loop inside if condition


In k2 rules I want to keep for loop inside if condition.may I know how to do it or is it possible?


2 replies

Hi @Namita,

 

I dont think it is possible to have a loop inside an If Condition, but you can have an IF Condition inside a loop:
 

I have a listView where i have a datalabe control, when I click a button, if the datalabel has data, the loop will iterate through all the items in my list view and shows a message

Kind Regards

Prineel

Hello Namitha,

 

You can have for loop inside IF Condition using unbound Rules.

  1. Create an unbound Rule with For loop.
  2. Inside IF Condition add Execute Another Rule from Actions and use the unbound rule. 

For more details please visit this link below

https://vijaydk2guy.wordpress.com/2017/03/22/nested-for-loop-using-unbound-rules/

 

Thanks,

 

Regards,

Vijay.

Reply