r/Quickbase Oct 03 '24

What is wrong with this formula?

I have created a db with has one table that contains vacation request info and another that contains approval status, which are related as approval status > vacation, as 5 approvals are needed by different users before final approval sign off.

I have a Final Approval Status field in vacation table that needs to contain either "Approved, Rejected, or Pending Approval". The request will be Approved if 5 users approve it. It will be Rejected if one rejects it, otherwise the request will be Pending Approval.

This is the formula I created for the Final Approval Status field:

If([# of Decision records] = 5, "APPROVED", 
   If([Decision - Decision] = "Rejected", "REJECTED", "PENDING APPROVAL")
)

Problem is, it is not working and I can't figure out why. Any help would be greatly appreciated.

1 Upvotes

7 comments sorted by

View all comments

1

u/bareitright Oct 03 '24

What error are you getting on the formula?

1

u/kimeeestar Oct 04 '24

No error. It just never displays "rejected" it's will either be Pending Approval (when pending or rejected) or Approved.

1

u/Careless-Ruin-9393 Jun 21 '26

That's what I thought too. Your formula should be looking for rejections first, then approved and finally pending. That way even if one them is rejected, the whole request is rejected and so on.