Data Validation on a Data Gird

I am utilizing a data grid for user data entry. However, I do not want them to be able to submit the data unless they add one item to this data grid. Currently, I am using a microflow to show all of the errors at once for text and reference selector entries when they click save. I was hoping to use this for the data grids as well. Is there a way to do so? If not, how can I require at least one record gets entered into a data grid before submission?
2 answers

If you want to validate that a user has added a record, there are multiple ways to do this:

You could for instance include a boolean attribute ‘isNew’ on the entity that is displayed and of which one needs to be entered, and when a user submits the data, check if there is at least 1 object where isNew = true. If it passes this requirement, update the objects to isNew = false.

Be sure not to commit the record(s) before, as this might cause conflicts when multiple people are performing this task.

Good luck!


Can you be more specific with your question?

  • Are there two entities which are associated with one to many association?
  • Are you are trying to load the second entity which is loaded in data grid?
  • Or do you have only one data grid in the entire screen?