Forum Discussion

HarrisonSmith's avatar
HarrisonSmith
Qrew Trainee
2 years ago

Auto Update Formula List User Field

I'm trying to set up a notification to go to a group of people (in multiple different roles). But rather than type in their email addresses manually, I want a way to keep the list dynamic, so as the list of users in these particular roles changes, the notification will always go to the correct, most up to date list of users I want to send it to. So this notification would go to "the user(s) listed in this field.
I have a team members table with a checkbox field called Coordinators (fid 63). This checkbox is used for a handful of purposes, and I want to use it to send a notification (from a different table called Requests) to the employees who have that box checked. I have the following formula in a formula list user field, but it's throwing an error, saying "expecting user/userlist but found textlist." I've tried wrapping it in various UserToEmail/userlistToEmail functions etc. but nothing seems to work. If the formula query is returning fid 13, my email field on the team member table, why is it finding a textlist?
I also have a user field on the team members table where each app user is associated with their team member record. I've tried subbing in fid 25 where my fid 13 email field is in the formula to return the actual app user into the formula field, but that's not working either, again, seemingly regardless of what functions I try to wrap it in. 
I'm open to other ideas to solve this issue, & I wouldn't be surprised if there's an easy way to do this I haven't thought of, but I feel like this should be working. I tried a formula email field, but that only allows for 1 email address, not a list.

Formula List User field formula:

ToUserList(GetFieldValues(GetRecords("{'63'.EX.'1'}", [_DBID_TEAM_MEMBERS]), 13)))
//fid 63 = Coordinators
//fid 13 = Email
//fid 25 = User

------------------------------
Harrison Smith
------------------------------

2 Replies

  • Thy this 
    var text UseridsInTextFormat = ToText(
    GetFieldValues(GetRecords("{'63'.EX.'1'}", [_DBID_TEAM_MEMBERS]), 13));

    var user UserOne= ToUser(Trim(Part($UseridsInTextFormat,1,";")));
    var user UserTwo = ToUser(Trim(Part($UseridsInTextFormat,2,";")));
    etc etc etc ...

    var user UserTwenty= ToUser(Trim(Part($UseridsInTextFormat,20,";")));


    ToUserList($UserOne, $UserTwo, etc etc .... $UserTwenty)



    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------
    • HarrisonSmith's avatar
      HarrisonSmith
      Qrew Trainee
      That worked perfectly, thanks!

      ------------------------------
      Harrison Smith
      ------------------------------