I’m building an app for sales and trying to make a function where if the sale is totally paid, it can then be marked as delivered. I currently can’t work out what is going wrong with the current set-up.
I have a if-then field ‘Finance status’ within the ‘Sales’ table that will update as ‘Paid’ if both the :
Customer has paid
Finance has been paid
If only one has been paid, it will show as ‘Partially Paid’. If neither have been paid, it will show as ‘unpaid’.
I have a seperate ‘Sale Status’ table that looks like this :
On the ‘edit’ screen of the sales table, I have a tick for if the customer has paid and a choice component pulling the options from this ‘Sale Status’ table :
and the filtering is set up like this :
The ‘delivered’ option seems to only be taking into account the customer payment, and not the finance option. For example, even if a sale has a ‘Partially Paid’ finance status, the ‘Delivered’ option will show up.
I created this last week and it seemed to be working fine then, so I can’t work out what has gone wrong- any help very much appreciated!
But anyway, from what I can see, your Sale Status/finance status could have one of three values:
So if I look at your choice component filter conditions, I see:
Paid is empty, OR
Paid is Screen → Sale Status/finance status
Comparing that to the data in your Sales Status → Paid column, I would expect that “Order Taken” and “Cancelled” would always be shown (because they are empty), and “Delivered” would only be shown if the Sale Status/Finance status for the current row was “Paid”.
The thing that seems a little odd to me is that Paid column in your Sale Status column. How are the values in that column set? It’s unusual to change values associated with a choice list, so I’m not exactly sure what’s going on there…
Thanks! I realise that my terminology isn’t ideal as the ‘finance status’ includes customer payment and ‘finance’ payment so its more confusing than necessary!!
Yes, that is exactly how I would want it to work. However for some reason the ‘Delivered’ option is shown when the ‘customer payment’ option is ticked, even when the `Sale Status/Finance status’ is ‘Partially Paid’ or ‘Unpaid’. (I have double checked that it is the right column!)
Yes- you’re right there too! The values in that column were just hardcoded. I’m certain that there would a better way to do it - if you have any general recommendations on how you would go about this kind of thing, that would be very welcome! Thank you!
How is the finance status column configured?
Also, is the finance relation referring to a table under row ownership?
Most likely, I would guess the finance status is not coming across due to row owners, so any time the Paid checkbox is checked and the relation is empty due to row owners, then it’s automatically flipping the status to Paid.