Check if Types are True

In my app, I’m tracking the progress of the delivery (Load Table). Once it is delivered the user can submit it for payment (which is a button that creates a row in another sheet, Settlements Table, so I have a log of what has been submitted). Before that the user needs to upload 2 documents, a BOL and a Rate Con. This is required to get paid.

I already have a button that allows them to upload docs and to select the type (BOL or Rate Con). But this log is in another table. (Load Docs Table)

What I would like to do is have a validation… The submit button only shows if:

  • Is Picked up = True
  • Is Delivered = True
  • BOL Uploaded
  • Rate Con Uploaded

The last 2 are what I have an issue with. I have a relationship column in the Load table that logs me all related docs to that load. I’ve also created another column that is a look-up that tells me all the doc types that the load has attached. The problem I have is how do I now check that lookup column and say if BOL and Rate Con are in that cell “Ready to Submit”. This would then allow me to show the button to submit.

Note: I added those 2 boolean columns but I couldn’t figure out how to have them check off if it saw the right doc in the other column. Not even sure if this is the right approach.

You can simulate a boolean using an if-then-else column. So you could have something like:

If Relate Doc is empty
  Then false
Else if Related Doc Types is empty
  Then false
Else true

(I may not have the logic exactly right there, but I’m sure you get the general idea)

What about a join column instead of lookup (lets call it DocumentsType) and check the right doc with “if DocumentsType contains … (type)”

But I need to know that that there is at least one of each doc type in the column. It has to be BOL and RateCon.

I doesn’t seem that there is the ability to do “AND” in the IF THEN ELSE columnn.

What about using the “on submit action” to set the BOL and Rate Con column to True depends on the type the user chose? Let’s say set column BOL Uploaded to True if user chose BOL, same for Rate Con?

Yes it matters which document type they are updating. To get paid they need a BOL and a Rate Con… they are 2 documents. In the future there may be other docs they might want to upload like a receipt, ticket, some maintenance bill, lumper fee, etc. But to get paid you need to Rate Con (Is the document that has all the load information and what will be paid at the end of delivery) and a BOL (Bill of Lading - basically proof of delivery)

I would like to make sure that one of each type of document is linked to the load before the for payment button is shown. I could use the “is empty” but you need to have one of each type so that doesnt really work that well.

I created the

Is your form containing many entries component? To keep things easy I would suggest building a custom form with user-specific columns, then you can use the set column action as I suggested above.

Your submit payment validation would be the same as you wrote in the original post with the values coming from 4 boolean columns.