Get Specific Index In Array List

Hello,
I need your help for my obstacle. I have example of the String Array, that value is {“1”, “2”, “3”, “4”, “5”, “6”}

The Concept Steps:
1. Get List → {“1”,“3”}
2. Get List → {“1”,“3”,“4”}

OR:
Get List → {“1”,“3”,“5”,“6”}

Thank you in advanced. Regards,
Brian Henokh

Hi,

Can you elaborate the above rule?

Regards,

image

Notes:

  • The District is will be following up by the outside data (Dynamic Variable Data Input).
  • Data Follow Up (Time) in every District will be adjust to the Total Time Follow Up Process array list.

Hi,

In the above District2 case, your expected result is {1,2,3} as Int32 array (0 based index), right?
If it’s correct, the following will work.

arrMaster = {"1","2","3","4","5","6"}
arrTarget = {"2","3","4"}
arrResult = arrMaster.Select(Function(s,i) if(arrTarget.Contains(s),i,-1)).Where(Function(i) i>=0).ToArray

Regards,