Display repeater data based on logged in member price plan

@code-queen I think I understand what you’re saying but just before I go down this rabbit hole and make a bunch of changes, I want to be absolutely sure I’m doing the right thing :slight_smile:

So here’s the setup with some screenshots.

The read-only price plans has an ID field

I have added this same ID (manually) to my custom Program Plans data collection. This is the data collection with all the information for the repeater.

And in the the 3rd data collection called ‘Purchases’ that is linked to the events.js backend code, I added a 3rd field called ProgramID that is referencing the ID I manually entered in the ‘Program Plans’ data collection.

So now, in this data collection I have 3 fields:

  1. MemberID - gets populated automatically when the pricing plan function is called
  2. PlanID - gets populated automatically when the pricing plan function is called
  3. ProgramID - reference field connected to the ‘Program Plans’

As per your instructions in the last post, should I then remove this 3rd field (ProgramID) from the ‘Purchases’ data collection?

Also, you mentioned adding " OnReady insert a new record, set _id … " Where exactly am I adding this code? On the page I am planning to display the repeater?