# Create An Array for Payments

**URL:** <https://community.glideapps.com/t/create-an-array-for-payments/48030>\
**Category:** Ask for Help\
**Created:** [August 29, 2022, 3:57am UTC](https://community.glideapps.com/t/create-an-array-for-payments/48030 "2022-08-29T03:57:17Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ichilddev](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ichilddev/32/45179_2.png) [@ichilddev](https://community.glideapps.com/u/ichilddev)\
**Post date:** [August 29, 2022, 3:57am UTC](https://community.glideapps.com/t/create-an-array-for-payments/48030/1 "2022-08-29T03:57:17Z")

</div>

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.

 ![3 payments](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/4/641d8c0508045e466f57672212458c91390cf311.jpeg)

Will appreciate any suggestions or sample.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [August 29, 2022, 6:40am UTC](https://community.glideapps.com/t/create-an-array-for-payments/48030/2 "2022-08-29T06:40:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ichilddev](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ichilddev/32/45179_2.png) [@ichilddev](https://community.glideapps.com/u/ichilddev)\
**Post date:** [August 29, 2022, 7:15am UTC](https://community.glideapps.com/t/create-an-array-for-payments/48030/3 "2022-08-29T07:15:05Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [August 29, 2022, 7:29am UTC](https://community.glideapps.com/t/create-an-array-for-payments/48030/4 "2022-08-29T07:29:14Z")

</div>

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.

> [@ichilddev](#):
>
> Is there a solution/example how do i show Array elements into an inline list?

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

> [@Dropdown source from an array column](https://community.glideapps.com/t/dropdown-source-from-an-array-column/47984/11):
>
> [https://www.glideapps.com/docs/reference/basic-columns/array-columns](https://www.glideapps.com/docs/reference/basic-columns/array-columns)[https://www.glideapps.com/docs/reference/computed-columns/make-array](https://www.glideapps.com/docs/reference/computed-columns/make-array) For transposing an array for using in an inline list or choice component, you can refer to the below: [https://community.glideapps.com/t/transpose-columns-to-an-inline-list-the-miracle-method/32766](https://community.glideapps.com/t/transpose-columns-to-an-inline-list-the-miracle-method/32766) There are also a number of array related plugins available: [https://www.glideapps.com/plugins](https://www.glideapps.com/plugins)

---

<div class="post-metadata">

**Author:** ![ichilddev](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ichilddev/32/45179_2.png) [@ichilddev](https://community.glideapps.com/u/ichilddev)\
**Post date:** [August 29, 2022, 8:51am UTC](https://community.glideapps.com/t/create-an-array-for-payments/48030/5 "2022-08-29T08:51:37Z")

</div>

> [@Darren\_Murphy](#):
>
> 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.

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.

 ![relationBackto Billing](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/a/bac4b812bde0508e01df01509cf78d622aca4a1c.jpeg)

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [August 29, 2022, 9:04am UTC](https://community.glideapps.com/t/create-an-array-for-payments/48030/6 "2022-08-29T09:04:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ichilddev](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ichilddev/32/45179_2.png) [@ichilddev](https://community.glideapps.com/u/ichilddev)\
**Post date:** [August 29, 2022, 9:16am UTC](https://community.glideapps.com/t/create-an-array-for-payments/48030/7 "2022-08-29T09:16:25Z")

</div>

Hi Thanks! Got it!

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [August 30, 2022, 9:16am UTC](https://community.glideapps.com/t/create-an-array-for-payments/48030/8 "2022-08-30T09:16:43Z")

</div>

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