Hi!
How to get an attribute data type name in a script (Is it date, time, text, long, double or else)?
Regards,
Hi!
How to get an attribute data type name in a script (Is it date, time, text, long, double or else)?
Regards,
Hi Andrey,
You can use ArisData.ActiveFilter.AttrBaseType(<The type num>)
Result will be one of the constant Constants.ABT_*
From there, you can return the type name (you'll have to write it, there is no method available to get the name directly)
Cheers,
Didier
Hi, Didier!
Thank you very much! I created a function for getting information about data type of attribute as object collection.
===========
<code>function getAttributeDataTypes()
{
result = {};
result[Constants.ABT_BITMAP.toString()] = {"ArisType" : "BITMAP", "Description" : "Bitmap", "ExcelType" : undefined};
result[Constants.ABT_BLOB.toString()] = {"ArisType" : "BLOB", "Description" : "BLOB", "ExcelType" : undefined};
result[Constants.ABT_BOOL.toString()] = {"ArisType" : "BOOL", "Description" : "Boolean", "ExcelType" : "boolean"};
result[Constants.ABT_COMBINED.toString()] = {"ArisType" : "COMBINED", "Description" : "Combined", "ExcelType" : undefined};
result[Constants.ABT_DATE.toString()] = {"ArisType" : "DATE", "Description" : "Date", "ExcelType" : "date"};
result[Constants.ABT_TIMESPAN.toString()] = {"ArisType" : "TIMESPAN", "Description" : "Duration", "ExcelType" : "number"};
result[Constants.ABT_FOREIGN_ID.toString()] = {"ArisType" : "FOREIGN_ID", "Description" : "External identifier", "ExcelType" : undefined};
result[Constants.ABT_RANGEFLOAT.toString()] = {"ArisType" : "RANGEFLOAT", "Description" : "Floating point number domain", "ExcelType" : "number"};
result[Constants.ABT_FLOAT.toString()] = {"ArisType" : "FLOAT", "Description" : "Floating point number", "ExcelType" : "number"};
result[Constants.ABT_RANGEINTEGER.toString()] = {"ArisType" : "RANGEINTEGER", "Description" : "Integer domain", "ExcelType" : "number"};
result[Constants.ABT_INTEGER.toString()] = {"ArisType" : "INTEGER", "Description" : "Integer", "ExcelType" : "number"};
result[Constants.ABT_ITEMTYPE.toString()] = {"ArisType" : "ITEMTYPE", "Description" : "Item type", "ExcelType" : undefined};
result[Constants.ABT_FILE.toString()] = {"ArisType" : "FILE", "Description" : "Link/File", "ExcelType" : "text"};
result[Constants.ABT_LONGTEXT.toString()] = {"ArisType" : "LONGTEXT", "Description" : "Longtext", "ExcelType" : "text"};
result[Constants.ABT_MULTILINE.toString()] = {"ArisType" : "MULTILINE", "Description" : "Multi-line text", "ExcelType" : "text"};
result[Constants.ABT_SINGLELINE.toString()] = {"ArisType" : "SINGLELINE", "Description" : "One-liner", "ExcelType" : "text"};
result[Constants.ABT_TIMESTAMP.toString()] = {"ArisType" : "TIMESTAMP", "Description" : "Point in time", "ExcelType" : "date"};
result[Constants.ABT_TIME.toString()] = {"ArisType" : "TIME", "Description" : "Time", "ExcelType" : "date"};
result[Constants.ABT_VALUE.toString()] = {"ArisType" : "VALUE", "Description" : "Value", "ExcelType" : "text"};
result["-1"] = {"ArisType" : "error", "Description" : "error", "ExcelType" : undefined};
return result;
};</code>
===========