Create An Array for Payments

Hi Community

I am trying to create an array to store payments information for an invoice.

1.Payment Amount
2. Payment mode
3. Payment Date

Right now i am using 9 columns for the above, to restrict up to 3 payments mode updates. Not very efficient as the UI needs to take into account which fields have to be shown and hide to guide user updating the right field.

Will appreciate any suggestions or sample.

It’s easy enough to create arrays from those columns - just use a Make Array column - but I doubt that will make things any easier.

What I would be inclined to do here is split all your payments out into a single Payments table. So you’d have the following columns:

  • UserID (the user the payment was for)
  • Payment Date
  • Payment Mode
  • Payment Amount

Then you can relate payments back to each User via the UserID column. This will be much easier to work with. You can display all payments for any given user in an Inline List, and use rollups to count and sum the payments.

1 Like

HI Thanks for your reply.

Yes that will be easy! However if there’s multiple payments, the rows will add up though.

We have a similar issues that we are working on, that each employee has a history of employments. Each employment history is a roll. We have 1000 employees now, and each employees have 5 employment history, that adds up to 6000 rows, just to record this part!

Glide has a limit of 25000 rows for each app if I’m not wrong.

Is there a solution/example how do i show Array elements into an inline list?

Yes, it will cost more in terms of rows. I guess you need to decide whether the extra effort of doing it some other way is worth the benefit. Maybe an option to reduce the row count could be to archive older rows? I don’t know.

See the answer I gave to your other question about arrays. I linked to a video tutorial that shows you how to do this.

Hi I have create a new row in a Payment History table. whenever the payments for an invoice is updated.

The formula Rollup seems to only able to sum up ALL the rows instead of a reference, instead of those reference to the invoice number . i.e EA23002 has 2 payment amounts, which totaled 3000.

Does the Invoice Number exist in any other table?

If it does:

  • create a multiple relation from that other table to this one that matches the Invoice Number, and then do your rollup sum through that relation.

If it doesn’t:

  • create a multiple relation in this table that matches the Invoice Number to itself, and then do your rollup sum through that relation.

Hi Thanks! Got it!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.