Extend DERIVED attribute

Idea created by cdtj Champion on May 24, 2017
    Not planned
    • Grant Bruneau
    • cdtj
    • poibr01

    Hello community,

    as we know CA Service Desk have attribute type called DERIVED, which is virtual and can handle some logic like:

    - concatenate strings, like it presented in contact's combo_name which is "last_name, first_name middle_name";

    - check for NULL, group's combo_name is the same field but displaying only last_name;

    - fetch NX_ENV attributes, like it is in web_url;


    My idea is about to have possibility to hande custom defined functions in derived fields.


    Here is usage example possible in my case:

    // Publishing "gender" named attribute with type DERIVED in Contact factory;
    cnt -> gender DERIVED(z_check_gender(middle_name));
    // Regarding to the naming in our country, depending on the 
    // last character of the middle name we can determine person's gender;
    string z_check_gender(string middle_name) {
         string last_char;
         last_char = substr(middle_name, strlen(middle_name)-1);
         if (downcase(last_char) == "a")
              return "Female";
         else if (downcase(last_char) == "h")
              return "Male";
              return " ";

    PS: Sorry if the example looks strange