I'm trying to calculate the total amount spent by a customer in my LiveCode database app. Here's the script I'm using:When I run this script, I get an error message about "missing value." I think the problem is related to how I'm accessing the "amount" field in the orders table. Can someone help me fix this error?
CODE:
on calculateTotalSpent (customerName) local total := 0 repeat with aRow in orders where customer = customerName put the amount of aRow into total end repeat return totalend calculateTotalSpent
Statistics: Posted by florencepugh — Thu Jul 11, 2024 3:57 am