AG

Hi!

How to get an attribute data type name in a script (Is it date, time, text, long, double or else)?

Regards,

by Didier Nowak
Posted on Tue, 04/11/2017 - 16:10

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

0
by Andrey Gritsenko Author
Posted on Wed, 04/12/2017 - 10:44

In reply to by dinow

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>

===========

 

0

Featured achievement

Rookie
Say hello to the ARIS Community! Personalize your community experience by following forums or tags, liking a post or uploading a profile picture.
Recent Unlocks

Leaderboard

|
icon-arrow-down icon-arrow-cerulean-left icon-arrow-cerulean-right icon-arrow-down icon-arrow-left icon-arrow-right icon-arrow icon-back icon-close icon-comments icon-correct-answer icon-tick icon-download icon-facebook icon-flag icon-google-plus icon-hamburger icon-in icon-info icon-instagram icon-login-true icon-login icon-mail-notification icon-mail icon-mortarboard icon-newsletter icon-notification icon-pinterest icon-plus icon-rss icon-search icon-share icon-shield icon-snapchat icon-star icon-tutorials icon-twitter icon-universities icon-videos icon-views icon-whatsapp icon-xing icon-youtube icon-jobs icon-heart icon-heart2 aris-express bpm-glossary help-intro help-design Process_Mining_Icon help-publishing help-administration help-dashboarding help-archive help-risk icon-knowledge icon-question icon-events icon-message icon-more icon-pencil forum-icon icon-lock