set default field values

Glenn, you won’t be able to achieve what you’re after with appending " Family" using Conditions in this way. Your best bet here is to use a Snippet to autopopulate the New Account’s name with the Contact’s FirstName + " " + LastName + " Family", then navigate to Step 2. Here’s the code for an Inline Snippet that will do this. Create a new JavaScript Resource of type “Inline (Snippet)” and call it something like “SetDefaultAccountName”. Here’s the code:

var params = arguments[0], step = params.step, $ = skuid.$; // Get the contact model, // grab its First and Last Name fields, // concatenate them, // then append " Family", // and use this as the default Family Account Name var contactModel = skuid.model.getModel('NewPrimaryContact'), contact = contactModel.getFirstRow(), accountModel = skuid.model.getModel('NewAccount'), account = accountModel.getFirstRow(); var accountName = contact.FirstName + ' ' + contact.LastName + ' Family'; accountModel.updateRow(account,'Name',accountName); // Make sure that the Account Field Editor is updated $.each(accountModel.registeredItems,function(){ this.refreshFields(); }); // Finally, navigate to step2 step.navigate('step2'); 

To add this snippet to your Wizard, go to the first step in your wizard, and add an Action of type “Custom”, and put “SetDefaultAccountName” for the Snippet Name. Then, make an Action on Step 2 which saves both models, then navigates to the Contact or Account record. Here’s the full XML for a page that should do what you’re after:

<skuidpage showsidebar="true" showheader="true" tabtooverride="Contact"> <models> <model id="NewAccount" limit="" query="false" createrowifnonefound="true" sobject="Account"> <fields> <field id="Name"/> </fields> <conditions/> </model> <model id="NewPrimaryContact" query="false" createrowifnonefound="true" sobject="Contact"> <fields> <field id="FirstName"/> <field id="LastName"/> </fields> <conditions> <condition type="modelmerge" value="" field="AccountId" operator="=" model="NewAccount" enclosevalueinquotes="true" mergefield="Id"/> </conditions> </model> </models> <components> <pagetitle model="ContactData"> <maintitle>New Contact, then Account</maintitle> <subtitle> <template>{{Model.LabelPlural}}</template> </subtitle> <actions/> </pagetitle> <wizard> <steps> <step stepid="step1" steplabel="Create Primary Contact"> <components> <basicfieldeditor showsavecancel="false" showheader="true" model="NewPrimaryContact" mode="edit"> <columns> <column width="50%"> <sections> <section title="Contact Basics"> <fields> <field id="FirstName"/> <field id="LastName"/> </fields> </section> </sections> </column> <column width="50%"> <sections> <section title="Additional Info"> <fields/> </section> </sections> </column> </columns> </basicfieldeditor> </components> <actions> <action type="custom" label="next step" snippet="SetDefaultAccountName" icon="ui-silk-arrow-right"/> </actions> </step> <step stepid="step2" steplabel="Create Family"> <components> <basicfieldeditor showsavecancel="false" showheader="true" model="NewAccount" mode="edit"> <columns> <column width="100%"> <sections> <section title="Account Name"> <fields> <field id="Name"/> </fields> </section> </sections> </column> </columns> </basicfieldeditor> </components> <actions> <action type="navigate" label="Previous Step" window="self" icon="ui-silk-arrow-left" stepid="step1"/> <action type="save" label="Save" window="self" icon="ui-silk-accept" url="/{{Id}}"> <models> <model>NewAccount</model> <model>NewPrimaryContact</model> </models> </action> </actions> </step> </steps> </wizard> </components> <resources> <labels/> <css/> <javascript> <jsitem location="inlinesnippet" name="SetDefaultAccountName" url="">var params = arguments[0], step = params.step, $ = skuid.$; // Get the contact model, // grab its First and Last Name fields, // concatenate them, // then append " Family", // and use this as the default Family Account Name var contactModel = skuid.model.getModel('NewPrimaryContact'), contact = contactModel.getFirstRow(), accountModel = skuid.model.getModel('NewAccount'), account = accountModel.getFirstRow(); var accountName = contact.FirstName + ' ' + contact.LastName + ' Family'; accountModel.updateRow(account,'Name',accountName); // Make sure that the Account Field Editor is updated $.each(accountModel.registeredItems,function(){ this.refreshFields(); }); // Finally, navigate to step2 step.navigate('step2');</jsitem> </javascript> </resources> </skuidpage>