Task Report - Error Evaluating UI Expression

Hi All,

I'm getting an error when trying to display my Task Report in Production, but don't get this error in the Dev or Test environments -- please see the attached document with error and interfaces.

Error Evaluating UI Expression Expression evaluation error in rule 'ctm_gettaskuserorgroupdisplay' (called by rules 'ctm_portalreportcolumn' > 'ctm_tasksreport') at function 'group' [line 4]: Error evaluating function 'group' : Insufficient permission

I verified that there are no differences in the Task Report interface and all associated rules in all environments, so I'm not sure where to fix the error. I do have different permissions in Production, but after playing around and adding myself to various groups to in Prod it didn't seem to help. Specific instructions on what needs to be adjusted to make this work in Production would be greatly appreciated! 

Thank you!

-Sarah

  Discussion posts and replies are publicly visible

  • Hello Sarah,

    My guess is that your rule getTaskUserOrGroupDisplay might be fetching some groups that might be in your dev environment and not in your prod environment.
    My suggestion is to try to debug exactly that part and maybe verify the groups I believe they are case sensitive.
  • Thanks for the suggestion -- how can I check which specific groups are being fetched? I wasn't the one to set this up so I'm not sure where to look to see what it's referencing.
  • Can you check the output when you test the rule getTaskUserOrGroupDisplay separately
  • FYI: I have confirmed that for the users I need it to work for, it does not display this error in Prod. BUT, I do still need to understand where the groups are that are being referenced here. 

    I did run the saved test cases for this rule and it returned a list of "users" in the group, but they're the consultants that made this rule not internal users. It doesn't help me figure out what groups are being referenced.

    if(

     isusernametaken(tostring(ri!data[ri!index][1])),

     user(touser(ri!data[ri!index][1]), "firstName") & " " & user(touser(ri!data[ri!index][1]), "lastName"),

     group(togroup(ri!data[ri!index][1]), "groupName")

    )

    ---------------------------

    togroup() instructions = 

    togroup(value)

    Converts a value or values to Group. togroup(1) returns a Group with id 1. togroup({1, 2}) returns an array of Group with ids 1 and 2.

    Returns: Group

    value (Any Type): Value or values to convert. A scalar input returns a scalar Group. An array input returns an array of Group.

     

    I guess I don't understand what the part in red is doing exactly. Where is Group id 1, and where is the index coming from? Thanks for any help. 

  • 0
    Certified Lead Developer
    in reply to Sarah K.

    Hi  as per my understanding, to debug this issue, you can follow the below steps:

    1. Execute the rule independently and check whether it's getting break or not.

    2. If yes, then check for the line number, where error is pointing to

    3. If no, then check for dependents of this rule and verify all of them and also check for their security privileges as well, using step 3 you can understand, where all the places this rule is being invoke and what are the various values getting pass to this rule as an input.

    Hope this will help you to debug the root cause of this issue.

  • Of what I understand on what I have read is that you're trying to display the user or the group the task is assigned.

    1.- Can you try to add yourself to a group where it has all the permissions possible and try to fetch this?
    2.- The index is the hardcoded value to fetch the first element in the array and find the property of that value. Which basically means Find GroupName property of "Given Group Name"
    3.-Try to fill your rule inputs with whatever data is being passed in prod. This would help you find out what is breaking.
    4.- As Alok is telling. Check security privileges.
  • Hi sarahk09,

    Sometimes we get this kind of error message because of Groups security.
    If your report has groups, then check the group security whether the group security is Public or Personal or Restricted.
    If it is Personal , you should be Admin to access that group, If it is Restricted you should be be an Admin or Part of that group.

    Regards
    Shivakanth
  • Hi,

    The red part is fetching group names from the data based on index. I assume the data will contain an array of strings which refer group id, by using group function you are retrieving the groupName.
  • hi ,

    Can you first check this report after changing your user account to System Administrator. If this works, then you can check admin console to see if you have access to see all the users in the system.

    You often this get error when you do not have access to see User details. In admin console under Permission check if Default User Profile Visibility check box is checked. If this is not checked you will not have access to see the users details via a basic user id.
    So if we try retrieve group details of any users, you will get insufficient permission error.

    Also when you do not have access to see groups it self then you will get same type of issues. Please do check if this report return groups that have it Security Settings set to Personnel or restricted. If report returns groups like that also you will not have access to retrieve group details and face the insufficient permission error.

    Regards
    Suresh