Quantcast
Channel: OutSystems Community
Viewing all articles
Browse latest Browse all 1476385

[Forums] How to Create Recursive Function ?

$
0
0
Hello,

In my table, I have an attribute Index. Whenever I am creating new record, I am assigning value to Index as TableLength + 1.

I was getting Index number for every record as 1,2,3,4.....

Problem happening is that if I deleted record no 3, and added new record I am getting Index sequence as 1,2,4,4.....

I want to check whether particular Index is present or not and if that Index is not present, create that Index.

Suppose, I have Index sequence as 1,3,4....
First I will compare 1 is present in table or not. If present then start search for 2.
2 is not present then stop the loop and assign 2 as Index value.

I am not able to start foreach loop from first position once my comparison is finished for Index 1.

Please advice how to iterate through loop unless I get Index which is not matching. How to create Recursive function for this as well.

Thanks and Regards,
Suraj Borade

Viewing all articles
Browse latest Browse all 1476385

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>