Auto-populate columns based on lookup



Sorry if this is pretty basic, and all the better if it is :wink:

I’m using cross-site lookup to get values from 3 other lists and the primary values are coming across fine. However, I’d like to auto-populate other columns based on what I choose in the lookups. For example, I have a list “Sections” with columns Title, Person Responsible, Budget. In list “Actions”, I choose a section title using a drop-down lookup. When I choose the section title I’d like the Person Responsible and Budget columns in Actions to auto-populate with the relevant data from Sections. I’m presuming I need an on change function against the sections drop-down but for the actual retrieval of the other columns I’m struggling.

I’m using both forms designer and cross-site lookup.

Many thanks for your help.


Dear Chris,
The case is indeed not too complex, but there is one issue. I assume that Person Responsible is a Person field, correct? Person/Group fields are not supported by Cross-site Lookup, just like they are not supported by regular lookups. I can only recommend to have an extra field in “Sections” to store Person Responsible as text, so it can be retrieved.

As for Budget field, you’ll just need to modify Cross-site Lookup -> Advanced -> Request Items code to this:

function (term, page) {
  if (!term || term.length == 0) {
    return "{WebUrl}/_api/web/lists('{ListId}')/items?$select=Id,Budget,{LookupField}&$orderby=Created desc&$top=10";
  return "{WebUrl}/_api/web/lists('{ListId}')/items?$select=Id,Budget,{LookupField}&$orderby={LookupField}&$filter=startswith({LookupField}, '" + encodeURIComponent(term) + "')&$top=10";

Then you can retrieve Budget on the form with the following code:


P.S. In the future, it would be better to ask Forms Designer questions on the original forum, this forum is dedicated to Plumsail Forms, our newer product. But we are always glad to help!


Nikita - will this work in Plumsail Forms or just Forms Designer?


Dear @mauraobenshain,
This code is specific to Forms Designer and Cross-site Lookup. But you can do the same with Plumsail Forms, just include the desired field in Extra Fields property:
Then you can retrieve this data with the following code:

//for example:

If you are going to use this code on Form load, don’t forget about the events, so you’ll need to use something like this:

fd.spRendered(function() {
  fd.field('Lookup').ready().then(function(field) {