Automating the Creation of Payment Schedules for Loans in AppSheet

Hello, AppSheet Community!

I am working on a loan management app in AppSheet that involves automating the generation of cobros (payment schedules) when a new loan (prestamo) is created. Despite extensive efforts and advice, I have been unable to fully implement this functionality, and I need your guidance to solve this problem.

My Goal

When I create a new loan, I want the system to automatically generate multiple cobros (one for each payment period) in the Cobros table. Each cobro should include:

  • Indice_cuota: A sequence starting from 1 up to the Number of Cuotas for the loan.
  • Fecha_cobro: Calculated based on the loan’s start date, frequency of payment, and the cuota index.
  • Monto_cuota: The loan’s total amount divided by the number of cuotas.
  • Estado_cobro: Initially set to “Pending.”

Tables and Their Columns

Prestamos (Loans)

Column Name Type

_RowNumber Number
ID_prestamo Text
ID_cliente Ref
Monto prestado Number
Frecuencia de Pago Enum
Deuda total Number
NĂșmero de Cuotas Number
Fecha de Inicio Date

Cobros (Payment Schedules)

Column Name Type

_RowNumber Number
ID_cobro Text
ID_prestamo Ref
Indice_cuota Number
Fecha_cobro Date
Monto_cuota Number
Estado_cobro Enum

What I Have Tried

Here are the steps I have taken:

  1. Created a bot triggered when a new loan is created.
  2. Set up a table called Helper_Indices containing sequential indices (1, 2, 3, 
) up to a predefined number (e.g., 50).
  3. Attempted to reference the loan’s ID_prestamo in the action that generates cobros, but encountered errors like “Unable to find column ‘_THISROW’” and “Unable to find column ‘ID_prestamo’.”
  4. Tried using actions to populate Helper_Indices with loan data, but the connection between the tables does not seem to work as intended.

Current Challenges

  • Cannot reference ID_prestamo from the Helper_Indices table.
  • Actions that rely on _THISROW or similar expressions fail to connect tables properly.
  • The app crashes when certain actions are triggered.

What I Need

Could you provide a step-by-step solution or example implementation for automatically generating cobros when a loan is created? Specifically:

  • How to correctly reference ID_prestamo in actions or bots?
  • How to use Helper_Indices effectively, if at all?
  • Any alternative approach for generating cobros automatically?

Thank You!

Thank you for taking the time to read this. I appreciate any guidance or solutions you can offer.

I strongly advise that you hire an AppSheet developer to help. Trying to get step-by-step help through chat for such an involved process is simply not feasible. There is a lot more involved than you may realize.

Alternatively, if you wish to do this on your own. then break down the problem into smaller pieces and ask for help on focused items.

5 Likes