Request data using fid name rather than fid id

Hi,

Is the answer in question: https://community.developers.refinitiv.com/questions/19599/issue-while-using-dynamic-view-with-acronym.html still valid?

Asking as the Websocket API is supporting both requests fid id and fid name. Is there another way to convert BID to 22 in the below sample?

array.fixedWidth(2);

array.add(EmaFactory.createOmmArrayEntry().intValue(22));

array.add(EmaFactory.createOmmArrayEntry().intValue(25));

Thanks,

Erol

Best Answer

  • Hi @erol.komac,

    The EMA C/C++ or Java SDKs only support the ability to define a dynamic view based on a numeric FID. However, if you prefer to expose an interface to specify the field name, the only recourse that comes to mind is to utilize the data dictionary.

    The easier way is to load the \etc\RDMDictionary and parse out the FID / Fieldname entries into a lookup table. Alternatively, you can download the dictionary from the server and perform the same parsing into a lookup table.

Answers

  • Hi @erol.komac,

    The ADS still does not seem to support field name based view for RSSL protocol. Only websocket protocol seems to do this currently.

    I tried this with RRT-Optimized environment, and the view request was ignored by the ADS:

    array.add(EmaFactory.createOmmArrayEntry().ascii("BID"));
    array.add(EmaFactory.createOmmArrayEntry().ascii("ASK"));
    array.add(EmaFactory.createOmmArrayEntry().ascii("DSPLY_NAME"));
    view.add(EmaFactory.createElementEntry().uintValue(EmaRdm.ENAME_VIEW_TYPE, 2));
    view.add(EmaFactory.createElementEntry().array(EmaRdm.ENAME_VIEW_DATA, array));