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-sdkema-apirrtelektron-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

· Write an Answer
Upvotes
Accepted
18.2k 21 13 21

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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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