I am trying to create a task report and I have taken reference from:

Hi

I am trying to create a task report and I have taken reference from:
forum.appian.com/.../Task_Report_Tutorial.html

In my task report I have a column Assigned To. The values in this column are either Group or User which are being displayed but group is being displayed as Goup: id and user as username, PFA screenshot for your reference.
Can some one please suggest how do I display user's as well as group's name?

Thanks in advance....

OriginalPostID-199642



  Discussion posts and replies are publicly visible

Parents
  • @komalc Here goes the answers to your questions and please do let us know in case of any follow-up questions:

    >> What is the typename of this type number?
    Test the expression below:
    fn!typename(127)

    And you will see that the output is 'List of User or Group'.

    As far as I know there isn't any documentation available so far until and unless I miss something. One way how I generally do in case of Appian Data Types (mentioned at https://forum.appian.com/suite/help/16.1/Appian_Data_Types.html) is, you can determine the type number by using the local variable or rule input in an expression rule. Here I have used local variable and you can try the same by using rule input.

    Examples:
    1.
    load(
    \tlocal!NumberInteger:1,
    \tconcat("Type Name: ",typename(typeof(local!NumberInteger)),char(13),"Type Number: ",typeof(local!NumberInteger))
    )

    2.
    load(
    \tlocal!NumberInteger_Multiple:{1},
    \tconcat("Type Name: ",typename(typeof(local!NumberInteger_Multiple)),char(13),"Type Number: ",typeof(local!NumberInteger_Multiple))
    )

    3.
    load(
    \tlocal!Text:"abc",
    \tconcat("Type Name: ",typename(typeof(local!Text)),char(13),"Type Number: ",typeof(local!Text))
    )

    4.
    load(
    \tlocal!Text_Multiple:{"abc"},
    \tconcat("Type Name: ",typename(typeof(local!Text_Multiple)),char(13),"Type Number: ",typeof(local!Text_Multiple))
    )

    If you would like to stay away from using number, you can create a constant of type 'User or Group' and use the same in casting as follows: (And you don't need to configure any values for this constant)

    fn!cast(fn!typeof(cons!my_user_or_group_constant),)


    Please do bear in mind that we don't need to do in the above mentioned way (that is making use of a variable rather than a type constructor) for cdt as we can access a cdt using type constructor as follows:

    Examples:

    1. If we need the type number of cdt of single type:
    cast(typeof(type!myCDT()),)

    2. If we need the type number of cdt of multiple type:
    cast(typeof({type!myCDT()}),)

    I guess we can also eliminate usage of numbers (that is, 127 in cast(127,)), if we are able to access the Appian Data Types mentioned at https://forum.appian.com/suite/help/16.1/Appian_Data_Types.html using type constructor as mentioned in the above example.

    >> And re the statement - "You have casted the input into a type":
    So when you query the analytics and get the resultant data, I observed that Appian understands the type of data held in the 'tp!assignees' column (In general, most of these kind of cases) is of type 'Any Type'. That's the reason why we are casting the 'Any Type' data to 'List of User or Group' data and this casting allows us to easily understand the User and Group objects present inside the actual data by making use of simple Appian functions.
Reply
  • @komalc Here goes the answers to your questions and please do let us know in case of any follow-up questions:

    >> What is the typename of this type number?
    Test the expression below:
    fn!typename(127)

    And you will see that the output is 'List of User or Group'.

    As far as I know there isn't any documentation available so far until and unless I miss something. One way how I generally do in case of Appian Data Types (mentioned at https://forum.appian.com/suite/help/16.1/Appian_Data_Types.html) is, you can determine the type number by using the local variable or rule input in an expression rule. Here I have used local variable and you can try the same by using rule input.

    Examples:
    1.
    load(
    \tlocal!NumberInteger:1,
    \tconcat("Type Name: ",typename(typeof(local!NumberInteger)),char(13),"Type Number: ",typeof(local!NumberInteger))
    )

    2.
    load(
    \tlocal!NumberInteger_Multiple:{1},
    \tconcat("Type Name: ",typename(typeof(local!NumberInteger_Multiple)),char(13),"Type Number: ",typeof(local!NumberInteger_Multiple))
    )

    3.
    load(
    \tlocal!Text:"abc",
    \tconcat("Type Name: ",typename(typeof(local!Text)),char(13),"Type Number: ",typeof(local!Text))
    )

    4.
    load(
    \tlocal!Text_Multiple:{"abc"},
    \tconcat("Type Name: ",typename(typeof(local!Text_Multiple)),char(13),"Type Number: ",typeof(local!Text_Multiple))
    )

    If you would like to stay away from using number, you can create a constant of type 'User or Group' and use the same in casting as follows: (And you don't need to configure any values for this constant)

    fn!cast(fn!typeof(cons!my_user_or_group_constant),)


    Please do bear in mind that we don't need to do in the above mentioned way (that is making use of a variable rather than a type constructor) for cdt as we can access a cdt using type constructor as follows:

    Examples:

    1. If we need the type number of cdt of single type:
    cast(typeof(type!myCDT()),)

    2. If we need the type number of cdt of multiple type:
    cast(typeof({type!myCDT()}),)

    I guess we can also eliminate usage of numbers (that is, 127 in cast(127,)), if we are able to access the Appian Data Types mentioned at https://forum.appian.com/suite/help/16.1/Appian_Data_Types.html using type constructor as mentioned in the above example.

    >> And re the statement - "You have casted the input into a type":
    So when you query the analytics and get the resultant data, I observed that Appian understands the type of data held in the 'tp!assignees' column (In general, most of these kind of cases) is of type 'Any Type'. That's the reason why we are casting the 'Any Type' data to 'List of User or Group' data and this casting allows us to easily understand the User and Group objects present inside the actual data by making use of simple Appian functions.
Children
No Data