If condition with different tables

hi guys,

need some help,i have two tables and a virtual column created with a fieldname “PAYMENT STATUS” on my bill_recording table, if the fieldname [TOTAL BILL] <= [PAID AMOUNT] if the condition is true status should be “Paid” if false should be “Unpaid” on the apps,

but currently i have difficulties added it on my app formula,

ive tried it on my spreadsheet and it is very simple.

=IF(G2<=‘PAYMENT RECORDS’!D2,“PAID”,“UNPAID”)

image

If you’re not trying to account for any other records in the table except for what’s in there - but you couldn’t run this sort of setup with multiple clients, or projects, or anything that would require it’s own separate total because your formula is working on EVERYTHING in the table.


To make this work best, it would be prudent to implement references in your app.

This will give you a reverse reference on the parent table, from which you can then do a list dereference of all payment amounts - wrapping that in a SUM().

SUM([Related Payments][Payment_Amount])

From there, you can then do your condition check:

[Total_From_Payments] >= [Bill_Amount]
or
[Bill_Amount] - [Total_From_Payments] <= 0
etc.

3 Likes