Wizard Record Saves

Jason, J. from Skuid here. Glenn has you on the right track (thanks Glenn!), but there are a couple small adjustments that I would recommend. I would use two Models (both on Contact, neither loading data on page load) and our Wizard component. The first model (call it “SearchContact”) would only be used in wizard step #1, which would only ask for whatever information you want to search on in model #2 (call it “NewContact”). SearchContact should also have “Create Default Row if Model Has None” checked. NewContact would have a condition for each of these inputs, so if your duplicate check criteria is just checking for an existing email address, you would have one Condition (Filterable Default Off) on NewContact named “EmailAddress” or something similar. Every Wizard step from 2 on and your Save button would use the NewContact model. When you click the Next button to get to Step #2, I would have it run a snippet which does the following: 1. Set the condition(s) on the NewContact model with the value(s) provided to the SearchContact model on Step #1 (using our skuid.model.setCondition method) 2. Load the NewContact model (using our skuid.model.updateData method) 3. In the callback for the model load, check to see if a row was returned and if not, use our skuid.model.createRow method to create one. 4. Navigate to step 2 using our wizard step.navigate method The model methods I mentioned in 1-3 are documented in our skuid.model documentation. A good example of inserting a snippet into the button to get from Wizard step 1 to step 2 and how to use the step.navigate method is covered in this community post. Lastly, just a small debugging tip: try opening up your browser’s Javascript console and using console.log() instead of alert() to get debugging info. Depending on your browser, of course, you should get more detail and be able to interact with the output a lot more, and it won’t disappear when you click OK. I hope that all this helps!