Model condition based on existence in another model

This is on the Skuid Platform (Brooklyn)
I have a table based on a model with a condition based on a field in a second model with a condition based on a page parameter.  My goal is to only show rows in the table based on these cascading conditions.  Unfortunately, the condition on the table model never gets applied and I get all rows.  I display a template on the page to show the value in the second model and it is correct.  If I make the the second model UI only and set the field to a constant, the table only shows the rows I want.
It appears that the models aren’t loaded in the order that supports this.  I’ve even tried setting the “Load Model after Page” on the first model hoping the be sure the second model is loaded before attempting to load the first.
Any ideas on what I’m doing wrong or is this not supported?

In what order are your models being loaded? It seems like the second model would need to be loaded first.

They load based on the position in the models section of the page builder. Top to bottom.

Does that solve your problem?

You’re right, the second model would need to be loaded first.  Changing position didn’t help.  I believe I tried that once before.  In my desired design, I have the second model in a master page and the first model in a child page.  Using that approach I couldn’t tell which one would load first so I moved the second model to the child page ahead of the 1st model so I could make sure it was above.  I examined the XML to make sure.
Still doesn’t work.
Is there any way to intercept the process with some JS and check how things are being loaded?  I even tried to include an inline snippet to re-query the 1st model but I don’t think I have the snippet right as I included an alert which didn’t come up.

At that point I’d be curious to test model uniqueness. Are the IDs of the model on the child page separate from the IDs of the master page? They would need to be different to have a hope that this would work.

They are completely unique

Is there an alternative method you could try, like instead of using the page parameters $Param, use $Models?

Stephen, not sure what you’re getting at here. I created a simpler page without master page with a UserInfo model reading a record from my AppUser data object where the userID has a condition to =10000. Then I have a model ControlItem with a condition CompanyID=UserInfo(CompanyID). I then have a table based on ControlItem. I also have a template on the page to show the value of CompanyID in the UserInfo model after the page is loaded. It shows CompanyID=1 but the table shows all companies.

I’ve included some relevant XML.

<span style='color:red'> CompanyID = {{CompanyID}} UserID={{UserID}} Company CI Name CI Descr CI Code Create DT Control Item Type Ver# NewControlItem ControlItem NewControlItem NewControlItem New Control Item Company ID Control Item Code Control Item Descr Control Item Name &nbsp

What data sources are you attempting to use for these two models on skuid platform?

SOCAdmin.  It’s my own database on Azure with an Odata cloud service in front of it.
BTW, I discovered that if I toggle the controlitemtype filter from all to a specific one and then back, the model is re-queried and only desired companyID as indicated in appuser is shown.  This reinforces the fact that there is a problem with the query order.