Cannot find text or value inside a split

John Ralls jralls at ceridwen.us
Thu Feb 14 19:51:52 EST 2013


On Feb 14, 2013, at 1:55 PM, Colin Law <clanlaw at googlemail.com> wrote:

> On 14 February 2013 21:31, DonM <dm413-gc at intielectronics.com> wrote:
>> On 2/14/13 Colin Law wrote:
>>> 
>>> On 14 February 2013 18:49, Derek Atkins <warlord at mit.edu> wrote:
>>>> 
>>>> DonM <dm413-gc at intielectronics.com> writes:
>>>> 
>>>>> -------- Original Message --------
>>>>> Subject: gnucash-user Digest, Vol 119, Issue 35
>>>>> From: gnucash-user-request at gnucash.org
>>>>> To: gnucash-user at gnucash.org
>>>>> Date: 2/14/2013 10:31 AM
>>>>> 
>>>>>>> Actually, the memo field is the second line that appears below the
>>>>>>>> 
>>>>>>>> description when you are using the the double line (Basic
>>>>>>>> Ledger)view.
>>>>>>>> The field that is associated to split lines is called Notes.  You can
>>>>>>>> see that when you put the curser highlight on a split line and look
>>>>>>>> at
>>>>>>>> the title bar.  This is an important distinction, particularly if you
>>>>>>>> are using business features such as accounts payable, but not so much
>>>>>>>> for most of the rest of us, unless we are doing a search.
>>>>> 
>>>>> 
>>>>>> It is the other way round in fact (memo vs notes)
>>>>>> 
>>>>>> Colin
>>>>> 
>>>>> 
>>>>> Right. So I stand by my original statement: If I am searching a bank
>>>>> 
>>>>> account and specify that I want to look for "memo" fields, then I am
>>>>> inherently looking for a split (memo fields only exist in splits), and
>>>>> I would expect to find the text.
>>>> 
>>>> 
>>>> You can, but it will only search for memos on the split that is
>>>> explicitly tied to the current account.  I.e, what you are effectively
>>>> searching for is:
>>>> 
>>>>   where Split.Account == ThisAccount AND Split.Memo == "memo"
>>>> 
>>>> It sounds like what you WANT to be able to do is:
>>>> 
>>>>   where Split.Account == ThisAccount AND
>>>>   Split.ParentTransaction.AnySplit.Memo == "memo"
>>>> 
>>>> Unfortunately this latter query does not exist, and would actually be
>>>> somewhat hard to implement in the current Query format, specifically
>>>> because "AnySplit" doesn't exist and would be hard to implement.
>>> 
>>> 
>>> I think what is expected that every split in every transaction of the
>>> account on display is searched.  I don't think that matches the query
>>> above does it?
>> 
>> 
>> I agree with Colin's statement "every split in every transaction of the
>> account on display is searched", AND I think that's matches Derek's query.
> 
> I must be missing something, Derek's query includes split.Account ==
> ThisAccount, but we want to find matches where split.Account !=
> ThisAccount, don't we want instead something like
> Split.ParentTransaction.AnySplit.Account == ThisAccount AND
> Split.Memo == "memo"
> 

You're getting tied up in pseudocode. 

What Derek is trying to convey is "For each split whose account matches the current account, retrieve from that split's parent transaction every split and return all of those splits whose memo matches 'memo'".

Split.ParentTransaction.AnySplit.Account == ThisAccount is functionally the same as Split.Account == ThisAccount. That's what Gnucash does now.

Regards,
John Ralls





More information about the gnucash-user mailing list