Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting an attributes display name from region name

Status
Not open for further replies.

mclumin

Programmer
Apr 10, 2008
3
CA
Hi,

Using LAPI, how would you get the the display name of a category attribute if all you have is the region name (eg. Attr_234234_34)?

Thanks in advance.

M.
 
one way would be getObjectInfo(234234) and in that look for leaf 34.It is quite possible that livelink returns the display name as well.I don't have builder at the moment .Judging by what you have posted I assume that you want to execute a sercah and all you have is the region name

I will try to look at it this a little later.Don't go after the getobjectinfo method,it may mislead you

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
Thanks appnair,

Please advise of what you find out.
 
Hi,

in LL9.2, you can also send a sql query that looks like:

select CatName, AttrName
from CatRegionMap
where RegionName = 'Attr_234234_34'

Regards,

Olivier
 
Sorry but I don't have anything more to add.Th previous posters suggestion of going after the catregionmap makes sense.If you wanted to do this entirely in lapi one would do a fetchcategoryversion and parse that file to figure out the name .Did you look at searchxmlapi and see if whther or not that gives you better results.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
I wrote too soon you have a function called
GetDisplayableFields
Code:
brokerID = GetSearchBroker(search, session);
            LLValue        vListBrokers=new LLValue();
            search.GetDisplayableFields(brokerID,vListBrokers);
      


A<1,?,'DisplayName'='My  Group:Group Name','Name'='Attr_151807_2'>
This when executed will give you a display name and the friendly name as you can see in my out put.I did not see anything that would give you only what you are looking for so maybe build this into memory if you can than rather call this ever so often

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top