Unknown field "assigned to"

Good morning,

I'm still working on the formula around the "Assigned to" and this field really giving me trouble.

So i want a field to indicate "1" if the case is assigned to X.
I wrote : 

ifElse(equal(related($assigned_user_link,"assigned_user_name"),"Yves Bourgarel"),"1","2")

But it is telling me "related: Unknown Field : assigned_user_name"

Whe i inspect the page, assigned_user_name definitaly seems to be the name of the field. I'm not sure if i should have a "related" function before, but even without it, i have the same problem.

Any ideas ?

thank you

Parents
  • Hi  ,

    assigned_user_name is not a valid field to use for the purposes of Sugar Logic formulas, you could do something like the following:

    ifElse(
        equal(
            concat(
                related(
                    $assigned_user_link,
                    "first_name"
                ),
                related(
                    $assigned_user_link,
                    "last_name"
                )
            ),
            "YvesBourgarel"
        ),
        "1",
        "2"
    )

    An alternative I do for a lot of our clients is to create a custom text field in the Users module which represents their full name with the following formula:

    concat(
        related(
            $assigned_user_link,
            "first_name"
        ),
        " ",
        related(
            $assigned_user_link,
            "last_name"
        )
    )

    I find this custom field useful for grouping in summation & matrix reports (as opposed to grouping by user name) as well as simplifying formulas like the one for your use case. Your formula would then look like:

    ifElse(
        equal(
            related(
                $assigned_user_link,
                "full_name_c"
            ),
            "Yves Bourgarel"
        ),
        "1",
        "2"
    )

    Chris

  • Oh strange... i deleted my initial question, because i found the answer a few minutes later :) 
    and i indeed used this to resolve the problem :

    related(
    $assigned_user_link,
    "first_name"

    thanks tho Slight smile

Reply Children
No Data