question

Upvotes
Accepted
11 3 1 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 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
18k 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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea