0

Show value of line items depending on the choice field selection

Hello everyone.

I have created a formula field to show the current total of our Petty Cash which is in a subtable. This needs to exclude amounts which were transferred to/from a bank.

In order to see the total amount of all line items were the choice field is "Cash", I created the below code, but it says "end expected at column 50" which if right after the "where".

sum(select 'Voucher Line Items'.'Total THB') where (select 'Voucher Line Items'.Account) = "Cash

Anyone with an idea what I am doing wrong?

2 replies

null
    • Ninox partner
    • RoSoft_Steven.1
    • 2 yrs ago
    • Reported - view

    If the formula field is in the same form:(=faster executed without 'select')

    sum(('Voucher Line Items' [text(Account) = "Cash"]).'Total THB') 

    If the formula field is in another form:

    sum((select 'Voucher Line Items' where text(Account)="Cash").'Total THB')

      • NetSol Co., Ltd.
      • Bernd_Krell
      • 2 yrs ago
      • Reported - view

      RoSoft_Steven Awesome, works perfectly. Thank you very much 🙏

Content aside

  • Status Answered
  • 2 yrs agoLast active
  • 2Replies
  • 61Views
  • 3 Following