Hi @dylandavis09 ,
Ok, this is what I've done at my end, works ok at the moment but may need something better.
I've added a text input box to add values, called txtValue. I've also got a dropdown box called dpdChoice that has Deposit & Withdrawn as the two options. I've also added a user email & ID column for unique identifiers as more than one person could have the same name.
I have a button that, when clicked, will:
a) add a new transaction to the Transactions list
b) update the D-Tickets value for the relevant user
So adding the transaction:
// Determine whether value will be a positive or negative amount
With(
{
tvValue: If(
dpdChoice.Selected.Value = "Deposit",
Value(txtValue.Text),
Value(txtValue.Text) * -1
)
},
// Create new entry in Transactions list
Patch(
'Transaction History',
Defaults('Transaction History'),
{
Title: "Dylan Davis",
Email: "dylan.davis@email.com",
UserID: 1,
Deposit: Value(tvValue),
'Deposit Type': dpdChoice.Selected.Value
}
)
);
Then, updating the D-Tickets value for the relevant user. I'm using the List ID of the person for a one-to-one match:
// Sum all of users transactions
With(
{
tvSum: Sum(
Filter(
'Transaction History',
UserID = 1
),
Deposit
)
},
// Update users D-Tickets total
Patch(
'DHS Student Users',
{ID: 1},
{'D-Tickets': tvSum}
)
)
I've tested at my end and works ok, though may need a better solution that avoids delegation:

------------------------------------------------------------------------------------------------------------------------------
If I've answered your question, please mark your post as Solved. You can accept more than one post as a solution.
If my response was a good one, please give it a Thumbs Up!
Visit my blog: https://platformsofpower.net