Is there a way through the API to:
- Get the data type of an attribute such as one used as a checkbox (true/false)
- Get all the possible values of dropdown/select list that are allowed to be set for an attribute?
I looked at the GET http:///abs/api/methodology/attributevaluetypes but this doesn't seem to tell me much
M. Zschuckelt on
There are methods in the Report API to query the ArisMetaModel or MethodFilter: /abs/help/en/script/ba/#/home/r_O_ArisMetaModel/en/1
The method AttrBaseType gives you an int value, that you can compare to Constants.ABT_BOOL in order to see if the attribute is boolean.
The method AttrValueTypeNums gives you an int array of possible attribute values, if the AttrBaseType is Constants.ABT_VALUE.
The attribute values are ints. For standard attribute values there are Constants you can use. Look them up in the method. For custom values that you defined you need to look them up first in the ArisMetaModel with the method UserDefinedAttributeValueTypeNum, where you will need the GUID of the custom attribute and the GUID of the value.