Announcement

Collapse
No announcement yet.

Formula for Assigning Specified User's Team

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Formula for Assigning Specified User's Team

    Regarding the synchronous setting of assignedUser.teamsNames, I aim to set the work team to be the same as a specified user's team. However, the formula I attempted to use resulted in displaying [object Object], indicating a potential need to convert the object into a string format or to extract specific data from the object.​
    Click image for larger version

Name:	image.png
Views:	97
Size:	49.5 KB
ID:	100748Click image for larger version

Name:	image.png
Views:	52
Size:	26.6 KB
ID:	100749

  • #2
    teamsNames is a notStorable so you need to use the teamsIds instead, but if you want to see the name you can just loop through them and build your string.

    Comment


    • lj4353
      lj4353 commented
      Editing a comment
      How exactly should I proceed?

  • #3
    try this instead:

    PHP Code:
    $teamsIds assignedUser.teamsIds;

    $i 0;

    while (
    $i array\length($teamsIds)) {
        
        
    $team record\fetch('Team'array\at($teamsIds$i));
        
        if (
    $team) {
            
    job string\concatenate(job' 'object\get($team'name')) ;
        }
        
        
    $i $i 1;
    }
    ​ 

    Comment

    Working...
    X