Skip to main content
September 10, 2024
Solved

XFget to retrieve name from description

  • September 10, 2024
  • 2 replies
  • 4 views

Is there a function to lookup the name of a member from description.  I've been looking at the functions for a couple hours and cant find anything

Best answer by rhankey

There is no api function that directly returns a member name from a description.  However you can use api.Members.GetMembersUsingFilter() with a filter of something like "A#Root.DescendantsInclusive.Where(Description = Equity)", which will return a list of Members matching that filter.  You would need to figure out what to do if you got zero or more than one matches, as Descriptions are not required to be unique.

 

"

2 replies

September 11, 2024

I would venture no as Member Descriptions do not need to be unique so they couldn't be guaranteed to return a specific member. 

JonKunertAuthor
September 11, 2024

Thats what i figured, but was hoping I was wrong

September 11, 2024

Yeah, the hours of searching was probably your biggest clue 😉

rhankeyAnswer
September 11, 2024

There is no api function that directly returns a member name from a description.  However you can use api.Members.GetMembersUsingFilter() with a filter of something like "A#Root.DescendantsInclusive.Where(Description = Equity)", which will return a list of Members matching that filter.  You would need to figure out what to do if you got zero or more than one matches, as Descriptions are not required to be unique.

 

"

JonKunertAuthor
September 11, 2024

That will work. We dont use the description in multiple places.   Thank you for this