question

Upvotes
Accepted
11 4 4 5

How to get FieldID from a FieldName?

We are moving from RFA MarketData API to EMA. We used to get a FieldID given a FieldName using the following code.

TibMsg_mfeed* mfeed = TibMsg::Fname2Mfeed(reuters_name.c_str());
int rid = TibMsg::Mfeed2Fid(mfeed);

How would we do it in EMA?

Thanks.

elektronrefinitiv-realtimeelektron-sdkrrtema-apielektron-message-apic++elektron-data-dictionary
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Upvotes
Accepted
18.1k 21 12 20

Hi @nm

Here is sample code in Java:

DataDictionary dataDictionary = EmaFactory.createDataDictionary();
dataDictionary.loadFieldDictionary("RDMFieldDictionary");
dataDictionary.loadEnumTypeDictionary("enumtype.def");

DictionaryEntry fidEntry = dataDictionary.entry("BID");
System.out.println("BID FID is " + fidEntry.fid());

fidEntry = dataDictionary.entry("ASK");
System.out.println("ASK FID is " + fidEntry.fid());

And this is output:

BID FID is 22
ASK FID is 25 

You can do the same thing in EMA C++ using the following methods and classes.


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.