Loop through a list of fields

Loop through a list of fields

Hi there,
I was wondering if there is a way to create a list variable of field names and then loop through them?
Something like this...

rstypes  =  typesfrm  [ID == input.Bid_ID];
x=List(rstypes.supplieschk,rstypes.furniturechk,rstypes.ITchk,rstypes.staffchk);

for each y in x
{
if(y==true)
{show y;}
else
{hide y;
y.clear();}
}

Regards,
Will