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

Parents Reply Children
  • 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,

    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.