Discussions

 View Only
  • 1.  Formula text field to return ID of a user

    Posted 10-18-2019 05:36
    Edited by Ma. Isabel Gumanid 10-18-2019 11:50
    #field #Formulasandfunctions 

    Hello,

    We have a record with Agent Name, ID, Supervisor and Manager. The field "ID" returns the ID of Agent Name. What I want to do is add another field called "Supervisor ID" which should return ID of the Supervisor of that specific Agent. I'm thinking of a formula text field with this logic:

    ToText([ID] of [Supervisor])

    What should be the appropriate formula for this?

    ------------------------------
    Isabel Gumanid
    ------------------------------
    ​​​


  • 2.  RE: Formula text field to return ID of a user

    Posted 10-18-2019 15:58
    Try it like this

    ToText([ID]) & " of " & ToText([Supervisor])​


    ------------------------------
    Everett Patterson
    ------------------------------



  • 3.  RE: Formula text field to return ID of a user

    Posted 10-18-2019 20:10
    Thank you. 
     
    Still, it returns the ID of the agent instead of the agent's supervisor in that specific record.

    ------------------------------
    Ma. Isabel Gumanid
    ------------------------------



  • 4.  RE: Formula text field to return ID of a user

    Posted 10-21-2019 11:17
    Then just change the ID field to be the Supervisor ID

    ToText([Supervisor ID]) & " of " & ToText([Supervisor])​​


    ------------------------------
    Everett Patterson
    ------------------------------



  • 5.  RE: Formula text field to return ID of a user

    Posted 10-21-2019 11:27
    Thanks for getting back to this.

    We don't have "Supervisor ID" field as we only have the "ID" field which is the ID of everyone regardless of their position. So, for each record, we have the agent's full name and the ID would reflect that of the agent's. In that same record, the agent has the Supervisor name and I wanna add a formula field "Supervisor ID" beside Supervisor that should show the ID of the Supervisor. Is that possible?

    ------------------------------
    Ma. Isabel Gumanid
    ------------------------------



  • 6.  RE: Formula text field to return ID of a user

    Posted 10-21-2019 11:58
    Edited by Austin K 10-21-2019 11:58
    People are getting confused from your first post and they think you just need help with a text formula.

    What you actually need is help creating the basic relationship needed to even have that field to begin with. I don't know if there is a better way to do this but you should be able to create a relationship that is basically from the table back onto itself. so kind of like Employee -< Employee and use the Supervisor field as the reference for this. Then once that is done do a lookup in that relationship to the Employee User field. The lookup field should end up being something like Supervisor - Employee User, depending on your field names of course. That field should be the supervisor of your related employee, assuming it is set in the record properly. These may end up being numeric or user fields depending how it is currently setup. Hopefully this makes sense and if there's a better way I'm sure someone will chime in. I just know this works.


  • 7.  RE: Formula text field to return ID of a user

    Posted 10-21-2019 14:25
    Like Austin mentioned, it sounds like you need a lookup field on a relationship. On what table is the Supervisor ID?

    ------------------------------
    Everett Patterson
    ------------------------------