Forum Discussion

ArchiveUser's avatar
ArchiveUser
Qrew Captain
8 years ago

Compare users in fields

I need to compare Field A and Field B below.  Field A is a multiple user select and B is a multiple choice.  The users in Field A have been selected to approve a document.  They must all complete before the approval is complete.  I have created a checkbox to do this.
Contains([Quality Approval],(Part(UserListToNames([Quality Team]),1,";"))&"] Approved") and
Contains([Quality Approval],(Part(UserListToNames([Quality Team]),2,";"))&"] Approved") and etc.

My issue is I want to know which user the approval is waiting on.  So if a 10 users in Field A are required and only 9 have approved- which user am I waiting on.  I am putting a lot of documents through our system and would like a way to see this quickly.

 
  • Assuming your draft formula is correct the following might work:
    var Text QTA = Part(UserListToNames([Quality Team]), 1, ";");
    var Text QTB = Part(UserListToNames([Quality Team]), 2, ";");
    var Text QTC = Part(UserListToNames([Quality Team]), 3, ";");
    var Text QTD = Part(UserListToNames([Quality Team]), 4, ";");
    If (not Contains([Quality Approval], $QTA & "] Approved"), $QTA) & 
    If (not Contains([Quality Approval], $QTB & "] Approved"), $QTB) &
    If (not Contains([Quality Approval], $QTC & "] Approved"), $QTC) &
    If (not Contains([Quality Approval], $QTD & "] Approved"), $QTD
    The formula basically concatenates together those users in the Quality Team that don't appear in the Quality Approval log.

    But if there is a possibility that in the Quality tame may initially approve the request but later withdraw their approval the above formula would incorrectly classify their actions a approved.

    Script would provide a solution that covers all cases.

    Another approach would be to create a child table and the appropriate summary fields and reports. But I assume you like the compact display of the user list and logging field. I would like to hear Mark's input on using the child table.
    • ArchiveUser's avatar
      ArchiveUser
      Qrew Captain
      One issue:  If they state rejected then their name should not show up.  So in other words, they just need to respond: Approve or reject.  How do I add that in there?
  • I would go with Dan's solution and work though any small syntax problems which arise if there are any.

    Let us know how it goes.
    • ArchiveUser's avatar
      ArchiveUser
      Qrew Captain
      One issue:  If they state rejected then their name should not show up.  So in other words, they just need to respond: Approve or reject.  How do I add that in there?