In my second column I need the grave inscription from the Graves table. As my starting point is the Invoices table I do not know exactly how to retrieve this information.
I think you may be overthinking it. As odd as it may be you can just use a double dereference, so [Customer ID}.[GravesID].[Graves Column name]. It may be odd and there is likely a more efficient solution but I do believe that this will work for you. Please let me know if for some reason that does not work and I can help you get this figured out.
I hope you understand what I try to accomplish. I want an Invoice for a client and a detailed listing of the graves and services for each grave applied.
The point is that I donât have a reference in the table Customers to table Grave but the way around.
I cannot jump from the Table Invoice to Grave by [CustomerID].[PersonaID],[GraveID] as [PersonaID] is not a reference.
What would you suggest to create this master-detail in my Invoice-PDF?
Okay, now I understand, I apologize I misread the picture you had posted with your tables listed out.
So the nice thing about AppSheet is that it automatically is ready for this. When you establish the references and column types AppSheet automatically creates a virtual column in a parent table with the IDs of all related child table entries.
This means in your customer table there is at the very bottom of your column structure a virtual column called âRelated Gravesâ and âRelated Invoicesâ In case that did not pop up, you can make the expression using the REF_ROWS() function in AppSheet.
When it is time to use the Grave inscriptions lets say you have multiple inscriptions for the same customer. You could have a table that lists all the inscriptions that customer put on a grave. So you can put in that table <<Start:SELECT(Graves[ID],REF_ROWS(Graves, personalID)=[_THISROW].[personalID])>> <> <>
This will work as long as you stay within the start expression of your invoice. The ref_ROWS expression will show you the information you ask for for every grave that is associated with this customer. NOTE: If a customer comes twice, once a long time ago and once again in the present day, this will show them the inscription and information from the grave they purchased a long time ago, and the one in the present day. If that is to be avoided then the solution is a bit more complicated.
You would need to have the graves table reference the invoice as well as the customer. If you do this then it makes it so that the customer doesnât have to see every grave that they have ever purchased in each invoice. So each invoice will be only the grave that has not been billed. Which if you do not already I recommend having a column in graves that shows if it has been invoiced for or not that way you can filter it out in your Select expression. Your parent child relationships would look like this. Please tell me what you think of this.
Sorry Craig, this somehow just doesnât work for me.
Error 1 : âProcess Send Invoiceâ task âTask_Send_Invoice_Emailâ Attachment template. Expression âSELECT(Grave[GraveID], REF_ROWS(Graves, personaID)=[_THISROW].[personaID])â is invalid due to: Expression âSELECT(Grave[GraveID], REF_ROWS(Graves, personaID)=[_THISROW].[personaID])â was unable to be parsed: Object reference not set to an instance of an objectâŚ