MATLAB: How to check if a certain fieldname is recognized by the Bloomberg FETCH function in the Datafeed Toolbox 3.1(R2008a)

Datafeed Toolbox

I want to know if there is a function which checks if a fieldname is accepted by the Bloomberg FETCH function.

Best Answer

As of MATLAB 7.8 (R2009a) and later, there is a function ISFIELD which can be used to determine if a fieldname is recognized by the Bloomberg FETCH Command. An example usage syntax is seen below:
x = isfield(b,{'LAST_PRICE','VOLUME','OPEN','HIGH'})
Executing the above line returns the following:
x = 1 1 1 1
To read more about this function, please type 'doc bloomberg.isfield' into the MATLAB Command Prompt.
Prior to R2009a, there were no built-in functions in the Datafeed Toolbox to do this. As a workaround, there is an attached function called CHECKBBFIELD which loads the bbfields.mat file and checks the queried fieldname to see if it is recognized by FETCH.