Repeating Group List

I’m struggling a little with how to set up a repeating group for what I would like on my website. I have all the jobs we do on our admin side of my website. I wanted to add the invoice history for the job on each job info page. Under “jobs” in the database I added:

•Invoiced Date
•Invoiced Status(i.e. 1/3 total price, final invoice, etc)
•Invoiced Price

When I created each of those in the database I made them each a list. I would like the repeating group to show each of these as they are added on our invoicing page. Does it need to be set up differently in the database? or does it need to be set up a certain way in the repeating group. I’ve tried several different ways and nothing works

Do you mean Invoiced Date is a list, Invoiced Status is a list, and Invoiced Price is a list?

A better and more common database structure is to have a data type for Invoice which has fields for Date, Status, and Price.

Also include a field for the customer so it can relate back to who the invoice is for.

Then in your repeating group, you will do a search for all invoices who’s Customer is xxxx.

Does that help?

Yes, Invoiced date, status, and price are each set as a list. I did this because, depending on the job, there can be multiple invoices or just one.

I did have it set up like that and had everything from the Invoice data was under a section “invoice history” on our invoice page. The reason I changed it to what I’m doing now might take more of an explanation:

I have a drywall company. I’ve created this website for three things:
•Tracking every job (i.e job info, budget, etc)
•Sending the work orders to our employees
•Public webpage so future/potential customers can see what we do

Because of how our company works and how I have the system on my website setup I would like the invoice history to be in each job. This is because we do multiple jobs for the same customer. I.e. we work for contractors that give us multiple jobs. Therefore I need log in each job when it was invoiced, how much, and what status.

I still recommend the structure I suggested.

In each Invoice, in addition to the previous fields, you have fields related_Job and invoice_Date_Sent. Of course, any other relevant dates can be additional fields.

Think of it this way. Each invoice has certain data associated with it which should be part of that data type. Then you just need relations to customers, jobs, etc. so that you can search for invoices and filter down based on the job, or the customer, etc.

So when you need to show an invoice history in a job, do something like this:

Put your Repeating Group inside of a group whose Type of Content is Job and set the group’s data source to the job you want to display.

Repeating group:
Type of Content: Invoice
Data Source: Do a search for Invoices
(use these constraints: related_Job is Parent group’s Job, sort by invoice_Date_Sent)

Of course, change the constraints as necessary, but this is the idea.

1 Like

Thank you so much. This worked and did exactly what I was wanting

This topic was automatically closed after 70 days. New replies are no longer allowed.