0

Examples using SELECT

I’m a high school Economics teacher and I’m trying to create a simple bank system to teach my students how to manage their finances. I’ve successfully created a database that will update a running balance after multiple transactions, but I have to enter negative numbers in the withdrawal amount column. 

There has to be a way to word the following so it works...

Account.Balance is a formula field into which I put the following...

sum(transaction.amount where transaction.type is deposit) - sum(transaction.amount where transaction.type is withdrawal)

Note: Transaction.Type is a “choice” field with Deposit and Withdrawal. I have also put the numbers 1 and 2 into the above formula instead of Deposit, etc. 

9 replies

null
    • jwlevy613
    • 5 yrs ago
    • Reported - view

    I have also tried the following in the “Trigger after update” part of my Transaction sub-table:

     

    if Type=1 then Accounts.Balance+Amount else if Type=2 then Accounts.Balance-Amount

    • Intelligene
    • Adrian_Altenburger
    • 3 yrs ago
    • Reported - view

    Hello,

    I'm teaching business economics online and need help with the I have successfully created a simple checkbook with the Columns: balance, debit and deposit. Now, I need to created a database. Can I export my data from Pega Platform?

    Adrian Altenburger > Intelligene official https://essays.agency

    • Nick
    • 3 yrs ago
    • Reported - view

    @jwlevy613

    In the (double) accounting world all items are positive.

     

    Anyway, if I understand you correctly, to get the number as negative try something like this:

    if 'Transaction Type' = 2 then

    Amount := 'Withdrawal Amount' * -1

    • Nick
    • 3 yrs ago
    • Reported - view

    Please ignore this...

    • Compleasy
    • silver_bee
    • 3 yrs ago
    • Reported - view

    I did something similar to this. Have you tried something like 
    sum(Account.Balance[Transaction.Type = 1].transaction.amount)-sum(Account.Balance[Transaction.Type = 2].transaction.amount)

    What I did worked for me, but I haven't tested the above. 

    • writingz
    • KathrynLykins
    • 3 yrs ago
    • Reported - view

    Beginning Economics education is too focused on theory. Once you get past the basic models, it would be better for students to learn about the US and world economies, from a descriptive standpoint. And to learn some basic economic history. This would produce better informed citizens and workers.

    For example, no one who knows economic history would advocate making major spending cuts while the country is in a deep recession, as happened with the Tea Party Congress. 
    https://www.domyhomework4me.onl/

    • writingz
    • KathrynLykins
    • 3 yrs ago
    • Reported - view

    Beginning Economics education is too focused on theory. Once you get past the basic models, it would be better for students to learn about the US and world economies, from a descriptive standpoint. And to learn some basic economic history. This would produce better informed citizens and workers.

    For example, no one who knows economic history would advocate making major spending cuts while the country is in a deep recession, as happened with the Tea Party Congress. 
    <a href="https://www.domyhomework4me.onl/">https://www.domyhomework4me.onl</a>

    • writingz
    • KathrynLykins
    • 3 yrs ago
    • Reported - view

    Beginning Economics education is too focused on theory. Once you get past the basic models, it would be better for students to learn about the US and world economies, from a descriptive standpoint. And to learn some basic economic history. This would produce better informed citizens and workers.

    For example, no one who knows economic history would advocate making major spending cuts while the country is in a deep recession, as happened with the Tea Party Congress. 

    [url=https://www.domyhomework4me.onl/]https://www.domyhomework4me.onl[/url]

    • Mconneen
    • 3 yrs ago
    • Reported - view

    @Adrian

    There are a few double entry accounting examples in the various webinars. (see 041_Accounting System in the English Webninar Team).    I also developed one for myself to track all my assets, expenses, liabilities .. etc..   So.. it is 100% possible and flexible to do this in Ninox... 
    datamodel

     

    If you want to focus more on the theory and less on the programming .. ... and show how finances flow through a chart of accounts..  There is an excellent AND FREE accounting package here.. 
    https://www.gnucash.org/

Content aside

  • 3 yrs agoLast active
  • 9Replies
  • 3448Views