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

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

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

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

@ThinhDinh

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.

4 Likes

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. on my items table, there’s the column for the gross margin (math column):

  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)

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

  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.

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

1.2
action to increment number in the user profile

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!

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. :sweat_smile:

4 Likes

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.

1 Like

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

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.

3 Likes

that works perfectly.
thanks a lot for your patience.

3 Likes

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