Editable List Validation
Hi Aditi
I have found validating editable lists to be very problematic. If the data needs to be validated I prefer to use a pop up view to have the user add/edit the data rather than in the list view itself.
To do this, create an item view with the fields you want to add (you can bind the view to the smartobject if you want) and add a save button . Add a rule to the save button that validates the view (required fields are input) and then closes the view. Then on your form when the add button is clicked open the subview (remove any rules to add a new row to the list). You will then have the Save rule from the view accessible on the Form (you may need to close and re-open the form to see it).
Edit the view Save rule from the Form and do the following just before the close event
1. Add a new row to the editable list
2. Transfer data from the subview to the edit row fields (i.e. populate the data from the subview into the list)
3. Apply the changes to the editable list
You can then call the save function as per normal on the list view to save the added row(s).
You can also apply the same logic to editing an item - just need to pass in the selected rows data when opening the subview.
Reply
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.