You can use the "GetFieldAttribute" command, e.g.
GetFieldAttribute cell[All items,Material,1] protected="prot"
if V[prot=X]
...
endif