I can't get amountremaining to appear in the resul...
# ask-stanley-ai
c
I can't get amountremaining to appear in the results of a scripted saved search - how do I get the unapplied amount on a customer payment with a scripted saved search?
c
AI generated answer (using internal Slack threads):
To get the unapplied amount on a customer payment with a scripted saved search, you can use the 'Amount Remaining' field. However, it seems like you're having trouble getting this field to appear in your results. Here's a possible solution: 1. Make sure you're using the correct field name. It should be 'amountremaining' (all lowercase, no spaces). 2. Ensure that your search criteria are set up correctly. For example, you might want to include criteria such as 'Type = Customer Payment' and 'Posting = Yes'. 3. If you're still not seeing the 'Amount Remaining' field in your results, it could be because the first line of your search results is blank. This can happen if the first payment in your search results has been fully applied, leaving no amount remaining. To avoid this, you could add a criteria to your search to only include payments where the 'Amount Remaining' is greater than zero. For Customer Deposits, 'Amount Remaining' doesn't apply. You might need to do a grouped search summarizing Deposit Application(s) applied against the Customer Deposit. This can be done via the Applying join. You then take max(Customer Deposit amount)-sum(applying amount) where the applying amounts is the total of all the Deposit Applications. For Vendor Prepayments, 'Amount Remaining' doesn't work. You can use a formula instead. Set the criteria 'main line' to false and use the formula numeric:
amount - amount paid
. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.861258328
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.86027205
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.855014563
Please provide your feedback on this answer.