​​How to set default value to Advanced Lookup control?

Last Update: January 02, 2018

Here are the steps on how to set default value to Advanced Lookup control.

  1. Open the form in design mode.
  2. Add Advanced Lookup control to the form and set its ID property "AdvancedLookup1"
  3. Select the AdvancedLookup1control.
  4. In the Rules pane, click on the Add icon to add a new rule, the Rule Manager dialog will open.
    How to auto-shifting Panel control in a form2.jpg
  5. Add a new rule as follows:
    A. Change the Rule Name as desired.
    B. Change the Rule Type to Action.
    C. Keep the Event Type onLoad.
    D. In the Action section, type the following script:
         setValue(AdvancedLookup1, '1') //where 1 represents the item ID saved in the given SharePoint list
    E. Click on the Save button to save the rule.
    Note: You can use Assistance Panel to help you adding functions and related parameters, form variables and form controls to Conditions and/or Actions sections.
  6. Test the form by clicking on the Preview button in the View Group.