2 Replies Latest reply on Nov 16, 2017 6:16 AM by rhaa

    Request Offering, Request Form: CurrentUserField("DN") does not work

    rhaa Apprentice

      I need to know from wich Domain a User Access a Service Request.

      The only Employee-Field I found that contains this Information ist the Active Directory Distinguished Name (Employee Field: DN).

      When I try to us this Field in Request Form, I get the following error message:

      The CurrentUserField function is called with a fieldName parameter (OU) which can not be evaluated in the browser expression. Ask the system administrator to remove it.

       

      Any ideas how I can Access this Field or any other ideas how I could get the Domain the currentuser works on?

        • 1. Re: Request Offering, Request Form: CurrentUserField("DN") does not work
          DTurner Specialist

          Hi rhaa,

           

          I have experienced issues with the 'Preview' functionality previously in that it wouldn't display values that worked fine on the portal. In what context did you use CurrentUserField("DN")?

          Using an existing request, I added a text field that pulls through the DN from the current user and this appears to work fine via the Self Service Portal (inc. mobile UI)

          • 2. Re: Request Offering, Request Form: CurrentUserField("DN") does not work
            rhaa Apprentice

            I tried again and it works now. I added a text field and set Default value Expression like you did. I have now idea why I got this error a few hours ago...

             

            In my use case, I Need to know if a user is member of a specific Domain. I used this Expresson for this, because there is no "like" or "contains" Operator so I had to code a Workaround:

             

            if ToString(Find("yourdomain",  CurrentUserField("DN"))) != "-1"

              then "yourdomain"

              else "notyourdomain"