Forum Discussion

MichelleL's avatar
MichelleL
Qrew Trainee
3 years ago

Report Help

Is there a way to achieve the following? 

I have records that require multiple approvals, let's call them Approval 1, Approval 2, Approval 3. 

There are several users who are able to complete each approval type; they're assigned the user roles Approval 1 Approver, Approval 2 Approver, etc. Each approval type only needs to be approved by one of the approvers who has that role. The user approves via a dropdown menu in the applicable field for that approval type.

I want to set up a report that filters to show each user only the records that are awaiting the approval type that that use is able to give. So, if the current user is someone with the Approval 1 Approver role, they would see records where the Approval 1 column is empty. 

I know this could be easily done by having the users filter the report themselves, but is there a way to automatically filter based on the user that is signed in and their role? Ideally I'd like to have one button that any user can click to instantly pull up all records that they could potentially approve.

------------------------------
Michelle L
------------------------------
  • There is a function called UserRoles("ID") which returns a textlist (like a multiselect formula)  of all the Roles which a user is in.  When you use the parameter "ID" it will return the ID# of the Role, like 10 for example or 10 11 if the user was in two Roles.

    So, I suggest that you make three formula checkbox fields like this

    [User is in Approver 1 Role?]

    Contains(ToText(UserRoles("ID")), "10")

    You can get the ID# of the role by clicking on the role in the roles list and observing the URL.

    Now that you have that set of three boolean fields, you can use them in your report filters.

    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------
    • MichelleL's avatar
      MichelleL
      Qrew Trainee
      Thank you! I will try that out - sounds (relatively) straightforward. I appreciate the help! 

      Another question:

      I set up a dynamic form rule to change the overall approval status of a record to 'Approved' once all of the individual approvals are in place, i.e. when each approval field equals 'Approved'.

      However, it's not working. I believe the problem is that I set each approval field to track who gave the approval, and the approval date, so that information is included in each approval field, along with the 'Approved' text selected via dropdown. But there doesn't appear to be an option to set the condition that each approval field *contains* the word "Approved". Is there a way around this? 

      (Thank you again!)

      ------------------------------
      Michelle L
      ------------------------------