$DBArray = @(
("DBName","Sever", "Instance","DBPath","R01","R02","R03","R04","R05",$False,$False,$False,$False,$Fasle),
("DB01","DEV-SRV01", "INSTDV01","BIN01","BR01","BR02","BR03","BR04","BR05",$False,$False,$False,$False,$Fasle),
("DB02","DEV-SRV02", "INSTDV02","BIN02","CR01","CR02","CR03","CR04","CR05",$False,$False,$False,$False,$Fasle),
("DB03","DEV-SRV03", "INSTDV03","BIN03","DR01","DR02","DR03","DR04","DR05",$False,$False,$False,$False,$Fasle))
$FetchButton.Add_Click({ GoFetchRX $DBArray })
function GoFetchRX {
Param ( $DBArray )
for ( $index = 0; $index -lt $DBArray.count; $index++)
{
Switch ($index)
{
0 {
#Do Nothing, This is the header
}
1 {
if ($DBArray[$index][4] -ne "N/A")
{
$IsValCheck = CHECKRVAL $DBArray[$index][4]
if(IsValCheck)
{ $DBArray[$index][9] = $True
} else
{ $DBArray[$index][9] = $false
}
}
2 { .
.
.
}
}
}
There is a lot of code, So I tried to give something as close as I can.