Formula for teams

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sandra6012
    Member
    • Jul 2018
    • 33

    Formula for teams

    Good afternoon.
    Could someone guide me in my formula?
    I try to assign a team to my record depending on the content of a field within the same record, but apparently it doesn't work for teams.
    This is the formula that I am applying:

    ifThen (office == 'Aguascalientes', teamsNames = 'Office Aguascalientes');

    Thanks in advance for your attention.
  • esforim
    Active Community Member
    • Jan 2020
    • 2204

    #2
    I don't use this type of formula so can't help you. Not sure if any of these thread give you some insight to getting it to work.


    Hi, hope i did not asked this question already. In Fomulas i need to know if the User who has saved the Form is member of a specefic Group. Thanks for any Help

    Comment

    • Maximus
      Senior Member
      • Nov 2018
      • 2731

      #3
      Hi sandra6012
      try to use this Formula:
      Code:
      ifThenElse(
          office == 'Aguascalientes',
          entity\addLinkMultipleId('teams', '52bd3ee937361'),
          entity\removeLinkMultipleId('teams', '52bd3ee937361')
      )

      'teams' - link name. You can get it in the relationship settings.
      '52bd3ee937361' - id of the team

      So if you set 'Aguascalientes' then the record will be assigned to a team. If you change it, then the record will be unassigned from this team.
      In case you don't need unassign action, then you can define the formula this way:

      Code:
      ifThen(
          office == 'Aguascalientes',
          entity\addLinkMultipleId('teams', '52bd3ee937361')
      )

      Comment


      • shalmaxb
        shalmaxb commented
        Editing a comment
        Hi,
        I tried that formula, without success. Perhaps I made some mistakes. I have the team panel on the right side of my main entity. There are 4 teams available, that I would like to change by a bool field in the main entity. If it is true it should unassign from one team and assign to another. If its false it should go back to the first team again.
        In the line, that starts with "entity....", do I have to put the name of my main entity or do I leave the word "entity".
        Do I have to establish first any relationship between team and my main entity? Because it is written here, that I can find the Id and the link name in relationships, what is not the case in my app.
        Appreciate a little help again.
    • sandra6012
      Member
      • Jul 2018
      • 33

      #4
      Thank you very much, it worked perfect!

      Comment

      Working...