Conditional Salesforce Record Creation

To start, please go to your Formyoula Dashboard - and click "New Form".

Rename your form, we will call our form "Weekly Class".

Add at least one page to your form. We will add one called "Class Details" and click the "+" button to create it.

Drag and drop a Salesforce Lookup field on your form. We will use the Event object on Salesforce to record our class attendance and link this to an existing Contact record. 

Click the pencil icon to edit the Salesforce lookup field.

Select an object you would like to use for the lookup, this will allow you to search for any record under this object. In our case we will name the Label as Contact and will link it to the Contact object.

Now drag and drop a "CheckBox" field. We will use this to create a new Contact if the Contact was not found via the lookup. Click the pencil button and rename the field. This field will be used to control the new Contact field visibility on the form.

Drag and drop a "Text Field", rename as "First Name". Press "Add Controlling Field" under "Controlling Field" select "Create New Contact?" and under "Show If" select "Yes" then press "Add". 

Drag and drop another "Text Field", rename as "Last Name". Press "Add Controlling Field" under "Controlling Field" select "Create New Contact?" and under "Show If" select "Yes" then press "Add". 

Drag and drop a "Header" field, we will rename it as "Class Information".

Drag and drop a "Text Field", we will rename it as "Class Name".

Drag and Drop two "DateTime" fields. Rename one for "Start Date&Time" and second for "End Date&Time".

When finished, click the "Save & Close" button.

Now we will need to add two Salesforce connections, one for the Contact record that will be created if existing is not found via the Salesforce lookup and the second one for the new Event record that will be linked with the new or existing Contact. Click "Add" under the connection column.

Select Salesforce from the available connections list and click "Create Connection".

First we will create a "Contact" connection to create a Contact record when a form entry is captured and existing Contact is not found. Select "Contact" from the "Salesforce Object" list and click "Save".

The Contact connection "Insert Sequence" will need to be "1", this will insure that the Contact is made prior to the Event. 

Select "Contact" under "Skip If?" this will insure that new Contact will not be created if it already exists and was found using the Contact lookup on the form.

Click "Save" when done.

On the first connection we will map our Contact's "First Name" and "Last Name" to create a new Contact on Salesforce if the Contact was not found via the lookup.

Check if the mappings are correct.

When mapping is done click "Back to Connections" button to make second connection.

Select Salesforce from the available connections list and click "Create Connection".

On the second connection we will create an Event on Salesforce that will be populated with the Class Details.

First, update the "Insert Sequence" to "2", so that the Event record is created after the Contact record.

Click "Save" when done.

Map the Formyoula "Contact" field to the Salesforce "Contact/Lead ID (WhoId)".

Map Formyoula [New Contact (Seq. 1)] field to the Salesforce "Contact/Lead ID (WhoId)" field.

Map the Formyoula "Class Name" field to the Salesforce "Subject" field.

Map the Formyoula "Start Date&Time" field to the Salesforce "Start Date Time" field.

Map the Formyoula "End Date&Time" field to the Salesforce "End Date Time" field.

Check if the mappings are correct.

Go back to the Formyoula Dashboard when done.

On the Formyoula Dashboard, click the "Try" button to launch the Mobile Web App. 

Select the newly created form.

Use the Salesforce Lookup Object to search for Contacts.

Tick the "CheckBox" to create a new Contact if Contact was not found via the lookup.

Press "Submit" when it is completed.

Now when you open Salesforce you will be able to find the Event for an existing Contact under the "Activities", or you will be able to find the newly created Contact with the Event under the "Activities".


  1. Use Repeat Groups to Create Salesforce Child and Related Records on Your Mobile Forms
  2. Lead Capture With Business Card
  3. Create Salesforce Event with Multiple Attendees
  4. Common Salesforce Record Errors
  5. Testing Formyoula In Your Salesforce Sandbox
  6. Create Records on Custom Objects With Formyoula
  7. Lookups for Salesforce Orders and Contracts
  8. Salesforce Record Select List
  9. Salesforce Child Record Auto-Fill Using Repeat Groups
  10. Adding Salesforce Lookup Fields to Your Mobile Forms
  11. Convert Existing Salesforce Lead Into an Account, Contact, Opportunity and Followup Task
  12. Salesforce Select Element for Record Assignments in the Field
  13. Salesforce Select Child Record Filter
  14. Offline Event Registration
  15. Add Users To Campaigns During Events
  16. Display Images and Signatures in Salesforce
  17. Set Record Types with Hidden fields
  18. Pre-fill Formyoula forms with Salesforce Information
  19. Autonumber new Salesforce records with a unique Formyoula entry ID
  20. New Contact Creation and Attachment to Campaign as a Campaign Member
  21. Override Select List Options With Salesforce IDs
  22. Updating existing records in Salesforce with Lookups
  23. Salesforce Record Type Switching With Workflow Rules
  24. Record Customer Site Visit on Salesforce
  25. Salesforce From With Multiple Line Items Using Repeat Groups
  26. Conditional Salesforce Record Creation
  27. Update or Create a Contact and Attach to a New Campaign as a Campaign Member
  28. Displaying Additional Salesforce Information for Lookup & Select Fields
  29. Send Email After Each Form Entry is Captured
  30. Record & Display Images in Salesforce
  31. Record & Display Signatures in Salesforce
  32. Record Voice Files in Salesforce
  33. Formyoula Integration With Salesforce Chatter
  34. Add Salesforce Users to Your Formyoula Account
  35. Formyoula Salesforce Features
  36. Create a Workflow Rule that will pre-fill information from a related object
  37. Prefill form fields from Salesforce using URL merge parameters
  38. Capture Photos, Signatures And Sketches Offline
  39. Create Multiple Related Salesforce Records Using a Single Form
  40. Create Time Based Workflow Rule To Retry Failed Formyoula Files
  41. Create, Update and Find Records on Salesforce
  42. Online and Offline Salesforce Lookup Search
  43. Filter Salesforce Records Based on Formyoula User Email
  44. Store Formyoula form entries directly in your Salesforce organization
  45. Create Salesforce Chatter Files, Attachments and Documents using Formyoula Form Files
  46. Create a Salesforce Event Record Linked To Multiple Contacts
  47. Create Custom Lookup Search Result Fields
  48. Sign In As Another Formyoula User
  49. Setup Single Sign-On (SSO) with Formyoula and Salesforce
  50. Formyoula and Salesforce User Refresh Token Management
  51. Passing secure and sensitive data in a Formyoula URL using AES encryption
  52. Add PDF Attachments to Files or Notes & Attachments on Salesforce

Feedback and Knowledge Base