Required fields missing: [Parent] - when adding a new row

  • 1
  • Problem
  • Updated 3 years ago
When trying to add a new row to a model I get a missing Parent ID error. Other rows in the model are rendering correctly because of a filter on the parentID
Photo of Eric

Eric

  • 70 Points

Posted 3 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
If the parent field is required,  you need to make sure it is being populated when you create a new record.  Just the fact that you have created a filter on existing records does not necessarily mean that the parent id will be populated in the new record. 

So you have a few options. 

1. Include the ParentId field in your table - forcing the user to put the parentId into the new record. 
2. Ensure the ParentId field is one of your conditions.  (This should be ParentID, not Parent.ID) 

Sometimes I create 2 conditions - on on ParentId and another on Parent.name - in order to ensure that both are available in the new record. 

Hope this helps.