# Disbursement - updating thee user profiles based on a single column in another table using custom actions?

**URL:** https://community.glideapps.com/t/disbursement-updating-thee-user-profiles-based-on-a-single-column-in-another-table-using-custom-actions/77216
**Category:** Ask for Help
**Created:** [October 19, 2024, 11:45pm UTC](https://community.glideapps.com/t/disbursement-updating-thee-user-profiles-based-on-a-single-column-in-another-table-using-custom-actions/77216 "2024-10-19T23:45:00Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![don\_pablo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/don_pablo/32/75929_2.png) [@don\_pablo](https://community.glideapps.com/u/don_pablo)
#### Post date: [October 19, 2024, 11:45pm UTC](https://community.glideapps.com/t/disbursement-updating-thee-user-profiles-based-on-a-single-column-in-another-table-using-custom-actions/77216/1 "2024-10-19T23:45:01Z")

</div>

hi. i have these tables with the following columns:

Items:  
Gross Profit  
Disbursement Date (starts blank)

Users:  
Dividend Rate (variable, only for operator-level users, blank for regular)  
Currently there are only 3 operator-level users with % at 40/40/20.

when an item has a “completed” status, i have an action that enables any operator to click on the button “disburse”, which sets the disbursement date to current date, and adds a row to a table called disbursements.

what i need help with, is for the “disbursed” dividends to be added to the 3 operators’ dividend wallets. if i can get that figured out, i already have a process for each user to request withdrawal of their dividend wallet.

since the disburse action is currently on the items table, i cant use the increment function. any advice would be much appreciated. thanks

---

<div class="post-metadata">

### Author: ![don\_pablo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/don_pablo/32/75929_2.png) [@don\_pablo](https://community.glideapps.com/u/don_pablo)
#### Post date: [October 22, 2024, 12:00am UTC](https://community.glideapps.com/t/disbursement-updating-thee-user-profiles-based-on-a-single-column-in-another-table-using-custom-actions/77216/2 "2024-10-22T00:00:01Z")

</div>

ffup on this question:

basically, there’s a gross profit column and i want to distribute the profits among 3 users with varying %. can anyone please give me an idea on how to achieve this? thanks

---

<div class="post-metadata">

### Author: ![don\_pablo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/don_pablo/32/75929_2.png) [@don\_pablo](https://community.glideapps.com/u/don_pablo)
#### Post date: [October 23, 2024, 12:04pm UTC](https://community.glideapps.com/t/disbursement-updating-thee-user-profiles-based-on-a-single-column-in-another-table-using-custom-actions/77216/3 "2024-10-23T12:04:25Z")

</div>

would someone please help me with this setting this up? thanks

@ThinhDinh

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [October 23, 2024, 1:19pm UTC](https://community.glideapps.com/t/disbursement-updating-thee-user-profiles-based-on-a-single-column-in-another-table-using-custom-actions/77216/4 "2024-10-23T13:19:32Z")

</div>

If you are not getting help here, that probably means there isn’t enough information to understand what you are trying to do, or it’s difficult for us to visualize your data structure and app flow. Since none of us can see your app, it’s hard to visualize what you are trying to explain.

Screenshots and/or videos help a lot when trying to understand a question. The best I can understand is that you are either trying to update a value in 3 user rows, or maybe you are trying to Rollup data from the disbursement table. If I’m understanding that correctly, the easiest method would be to Rollup the disbursements and then apply the percentage in the user table.

---

<div class="post-metadata">

### Author: ![don\_pablo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/don_pablo/32/75929_2.png) [@don\_pablo](https://community.glideapps.com/u/don_pablo)
#### Post date: [October 23, 2024, 7:53pm UTC](https://community.glideapps.com/t/disbursement-updating-thee-user-profiles-based-on-a-single-column-in-another-table-using-custom-actions/77216/5 "2024-10-23T19:53:37Z")

</div>

thanks for replying. yes, i am trying to update 3 rows.  
here are some additional info and hope this illustrates what i need help with:

1. on my users table, only 3 users are entitled to dividends: (the rates may change from time to time but for this practice i’ve set it to 30% each)

 ![1 Users](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/a/4a5d9337afbd1d4b4ae7c8c2515267fd4e71db97.png)

1. on my items table, there’s the column for the gross margin (math column):

 ![2 Items](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/c/1c8e921cdfa470201dda3a91a3e3f2380619193b.png)

1. on the layout, for items - i have a collection of items filtered to show only items with the status “completed”, ensuring that only the dividends for items with such status can be “disbursed” (for negative outputs, they should still be tagged as disbursed, then i have a rule for withdrawals to prevent requests below 0)

 ![4 Layout](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/0/c017b7057cd2989ad8340818286e5a8c70846fc9.png)

1. ideally, disbursed funds should go to the respective users’s dividend wallets:

 ![5 Wallets](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/0/a0b1fdfc65982e5de232fce74844b382325fc13b.png)

1. what i can’t figure out is, when any one of the 3 operators clicks on the disburse button, the only option i have to increment number is on the current user’s user profile.

 ![3 Actions](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/0/50cb397ba5d980ed998b48b005b6aa2a31ab5a43.png)

so far i have tried:

a. adding 3 additional columns to the items table, to relate each operator to the disbursed item via their UserIDs

b. adding a temp column on the users table to query the disbursements table and fettch their dividends

c. adding temp columns on the disbusements table do function same as B.

\*edit:

1.1  
action to set columns is used to set disbursement date and user IDs for the 3 recipients and the disbursement date

 ![5 edit show action set columns](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/c/9ce86ba8641aedc5faf4e9d83fc310a1889e4746.png)

1.2  
action to increment number in the user profile

 ![1.2 action to increment](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/5/a5b0ae8088787a577585f0265be0cba894ddb07e.png)

on all 3 scenarios i was actually able to fetch the correct amount for each of the 3 operators, but in all 3, i was only able to actually send the amount to ONE user - the operator who actually clicks the disburse button.

hope you can help. thanks!

---

<div class="post-metadata">

### Author: ![Sekayi\_Liburd](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sekayi_liburd/32/77608_2.png) [@Sekayi\_Liburd](https://community.glideapps.com/u/Sekayi_Liburd)
#### Post date: [October 23, 2024, 8:06pm UTC](https://community.glideapps.com/t/disbursement-updating-thee-user-profiles-based-on-a-single-column-in-another-table-using-custom-actions/77216/6 "2024-10-23T20:06:12Z")

</div>

My tip is to give your thread a title that indicates the type of help you need, for example, “Help choosing computed column types”. I think more people will respond. Personally, when I see the title “Disbursement” I automatically think I can’t help you because it’s not my field of knowledge. 😅

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [October 23, 2024, 11:39pm UTC](https://community.glideapps.com/t/disbursement-updating-thee-user-profiles-based-on-a-single-column-in-another-table-using-custom-actions/77216/7 "2024-10-23T23:39:31Z")

</div>

> [@don\_pablo](#):
>
> on all 3 scenarios i was actually able to fetch the correct amount for each of the 3 operators, but in all 3, i was only able to actually send the amount to ONE user - the operator who actually clicks the disburse button.

If there are only ever 3 people to be disbursed, then you should be able to create 3 relations that point to their 3 rows, from the Items table, then do 3 increments every time someone clicks the button.

---

<div class="post-metadata">

### Author: ![don\_pablo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/don_pablo/32/75929_2.png) [@don\_pablo](https://community.glideapps.com/u/don_pablo)
#### Post date: [October 23, 2024, 11:58pm UTC](https://community.glideapps.com/t/disbursement-updating-thee-user-profiles-based-on-a-single-column-in-another-table-using-custom-actions/77216/8 "2024-10-23T23:58:47Z")

</div>

![Screenshot 2024-10-24 at 7.53.34 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/f/ef62315ce199f73dd4012e71e8f5c680eac2cc47.png)s

i have tried both setting their UserIDs when the disburse button is clicked, and having template columns to house the 3 UserIDs (one columns for each user).

im more lost on the idea on how to actually disburse the funds to the 3 wallets. should i be doing this on the action editor? i can only increment the wallet for the logged in user if i go this route and i cant use the relations in the action editor either

or does it entail additional steps aside from the disburse action button? thanks

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [October 24, 2024, 12:02am UTC](https://community.glideapps.com/t/disbursement-updating-thee-user-profiles-based-on-a-single-column-in-another-table-using-custom-actions/77216/9 "2024-10-24T00:02:59Z")

</div>

I mean you should have three relations and try to increment 3 times, if the final data is on another table as a basic column.

---

<div class="post-metadata">

### Author: ![don\_pablo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/don_pablo/32/75929_2.png) [@don\_pablo](https://community.glideapps.com/u/don_pablo)
#### Post date: [October 24, 2024, 12:14am UTC](https://community.glideapps.com/t/disbursement-updating-thee-user-profiles-based-on-a-single-column-in-another-table-using-custom-actions/77216/10 "2024-10-24T00:14:35Z")

</div>

![Screenshot 2024-10-24 at 8.13.55 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/8/78e7b40038c75d669f3c293224d0c85333e6b84f.png)

that works perfectly.  
thanks a lot for your patience.

---

<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: [October 31, 2024, 12:15am UTC](https://community.glideapps.com/t/disbursement-updating-thee-user-profiles-based-on-a-single-column-in-another-table-using-custom-actions/77216/11 "2024-10-31T00:15:06Z")

</div>

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