Table Context Failing

And I have the fields used in the context in the models.

Hi Pat, I’ve watched your video and am trying to understand the database layout involved, and the page’s intended function. 

Is the context failure happening when you click the row action to “+ Add New Grant Year” in your “Select Service Areas” popup table? Or is the failure causing the wrong Service Areas to be displayed in the table in the first place? Is this a situation in which you could set a default field value for your new junction object record as part of the action sequence when “+ Add New Grant Year” is clicked?

The first popup is for a FG_Header__c which is related to a particular Year__c. In one of the tabs, there is table to junction Service_Area_Years__c between the current FG_Header__c and associated Service_Area__c records. The popup manages creating new Service_Area_Year__c junction records by displaying only Service_Area__c records that aren’t yet associated to the Year__c record associated to the FG_Header__c.

Hi Pat, 

We’ve dug into your scenario, in which the table context isn’t carrying through the way you’re wanting it to. Our sense is that the Context settings can only be set up to = or !=, which elicits a different behavior from “is in” or “is not in.” You would really need “is not in” to filter for Service Area that are not already in Service Area Years, but Context doesn’t supply that operator. 

One alternative we wanted to summarize would be to use the “Abandon row” action when your user clicks the + row action to add the Service Area row to the junction object Service Area Years. This would obviously remove the selected row from the Service Area model, and thus also the popup table. Along with this, you would need to re-query the Service Area model whenever the Select Service Area popup is displayed,  so the abandoned row can be brought back if it’s appropriate. 

It would look something like this.
1) “Add Service Areas” global action:

  • Set condition on Service Area model based on service area years already in the table
  • Query/re-query Service Area model to populate for the Select Service Area popup table
2) "Select Service Area row action:

  • Create Service Area Year row
  • Abandon selected row in Service Area model to remove it from popup table
This is just a brief outline, but we thought you would be able to get the gist of the suggestion. We hope this helps in your efforts.