Little background: I’m creating a New Task popup in my Home page that details a scheduled task. I originally set up it’s primary model “AddTask” with ‘Create default row’ unchecked and a record limit of 1.
In the Tasks table, I created a global action for Add New Task. under actions, I set ‘Create new rows in AddTask, start of the model, edit mode’, then produce a popup. In this New Task form I have a save which saves changes to AddTask, queries AddTask and the table model of OpenTasksToday and finally closes the popup.
Here’s the issue: After the popup closes and the new task appears in the table, clicking on New Task again duplicates the form to enter tasks. Even though the box for ‘create default row’ is off since I’m doing just that in the actions section.
I’ve found that removing the action for creating a new row and checking the ‘Create default’ in the model does work. I can confirm the way I originally had set it up worked a few weeks ago.
On your field editor in your pop up, check to make sure the Context is set. For your case, you’ll want it to simply say Context Id = Id of the row in context. That makes sure the field editor you are seeing is only the new one you are creating.
PS - you shouldn’t need to query AddTask model on your save.
I don’t think Context is what we’re looking for. This process is for creating an entirely new task. ‘Context Id = Id’ implies that an ID already exists. which would be fine if we were editing a previously created task.
The same goes for querying. I’m querying on save to clear out what’s been entered to the new Task. If I were editing one already created then true, I wouldn’t query it.