question

Upvotes
Accepted
1 0 0 2

Have any method to get fields number by fields names before request?

When I use StarterConsumer_BatchView C# sample,

have any method to get fields number by fields names before request not from reponse data.

Because via RFA.NET api to request data has to send fid id not fid name,so have any method can get fid id by fid names.

treprfac#.netfieldsommconsumer
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.

Hi @gary.liao,

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.


Thanks,

AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,


AHS

1 Answer

· Write an Answer
Upvotes
Accepted
78.9k 250 52 74

@gary.liao

You can use the RDMFieldDictionary class.

It has the GetFidDef(RFA_String) method to search the field definition by field name.

This method returns an RDMFidDef class. Then, you can call RDMFidDef::FieldId to get the field ID.

The RDMFieldDictionary class is used in the Decoder class of the example.


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.