How to add a new item to a lookup and reload in Rich Forms

Document created by Matthias_Walter Employee on Oct 19, 2016Last modified by Matthias_Walter Employee on Jan 27, 2017
Version 3Show Document
  • View in full screen mode

I recently had the question how to create an add new functionality on a lookup with skybow Rich Forms.

This is how you can resolve this requirement.



I got a 360 Degrees Staff Feedback list with a lookup to a contact list of persons/staff.

I want to fill out a feedback form, but then I realize that the person I want to give feedback to is still missing in the target list.

I would like to have the possibility to directly add this person on the feedback NewForm and it should be automatically selected afterwards.


How to:

  1. Start to enrich your NewForm by clicking the Ribbon action
    Enrich your form
  2. Add a button with action and place it somewhere next to the lookup field
    Add a button with actions to the form
  3. Add two actions in the action builder and configure them as follows (Open List Form & Redirect to url)
    Add Open List Form actionAdd redirect to url action
    The url to redirect can be calculated with the power of the skybow Expression Language. We redirect to the current page url by passing an additional parameter (pID). This parameter is dynamically retrieved by a function where we query the person list after adding a new item. The query language is CAML where we get the last person created by me and return the ID:
    [[@Page.Url]]?pID=[[@Web.GetFirstValueForQuery('Contacts', '<Where><Eq><FieldRef Name=Author LookupId=True  /><Value Type=User ><UserID/></Value></Eq></Where><OrderBy><FieldRef Name=Created Ascending=False /></OrderBy>', 'ID')]]


  4. Final step is to add a form load action to set the person lookup based on the query string parameter (pID) we've passed in the previous step
    Add form load action in Rich Forms Ribbon

    Add Form Load action to set person field

Final result:

Final result of the add new lookup how to in skybow Rich Forms

1 person found this helpful