You can't match on partial values; what you can do is
• use the regular relationship between Accounts and BillableItems and a portal filtered by:
IsEmpty ( Billable_Items::fk_ID_Invoice )
• create a calculation field in BillableItems, say, cAccountIDUnbilled as …
IsEmpty ( Billable_Items::fk_ID_Invoice ) ;
… and base your relationship on Accounts::ID_Account = BillableItems__Unbilled::cAccountIDUnbilled
Make sure the calculation's result type is “text” – since if your ID_Invoice starts with "INV", it must be a text field, and so must be the foreign key which you're referencing here as result.
Through experimentation, I found another way. Using a constant of “1” in ACCOUNTS, I created a relationship with a new TO of Billable_Items as shown in screenshot below.
In case the screenshot doesn’t appear above, this is the relationship.
Accounts::ID_ACC = Billable_Items_Not_Invoiced
Accounts::g_ONE-Constant > Billable_Items_Not_Invoiced::fk_ID_Invoice
Is there anything “wrong” with this? It’s an “academic” question but I’m trying to learn.
Your approach seems more logical and would be easier to decipher months from now. I’ll try it.