Hi Forum,
Do you know how to get the list of values for a multi-value attribute type ? I don't want the num but the name.
I played with filter and other methods like fromAPIName, getAttrValueAPIName, AttrTypeName, UserDefinedAttributeTypeNum, but I'm stuck now.
Thank you
Stéphane
Hi,
did you try this one on class ArisMetaModel?
AttrValueType ( int p_nAttrTypeNum, int nAttrValueTypeNum )
It returns a String. I would expect, that the language of the String is already known in the instance of the ArisMetaModel.
So with ArisData.ActiveFilter().AttrValueType(Constants.AT_SOMEATTRIBUTE, Constants.AVT_SOMEVALUE)
you should be getting the name of the value in the current method language of the user. For comparisons of the values I would rather not use the string value, since the string value is language dependent. You might have "Yes", "Ja", "Sí" for the same value depending on the language setting preferred by the user.
Hi,
I missed one detail: You asked for the list of values. There is the method
int[] AttrValueTypeNums( int attrTypeNum )
which will give you the list of available AttrValueTypeNums for the attribute type. With this list you ask for each value text in the above function.
Thanks a lot M. Zschuckelt, it works fine. Here a code example :
function main()
{
var filtre = ArisData.ActiveFilter();
var tabval = filtre.AttrValueTypeNums(Constants.AT_LOC_TYPE);
var val = "";
for (var num in tabval) { val = val + " | " + filtre.AttrValueType(Constants.AT_LOC_TYPE, tabval[num]);}
Dialogs.MsgBox(val);
}
main();