Cascading

Discussions about Cross-site Lookup
soylant
Posts: 9
Joined: Wed Jul 06, 2016

07 Jul 2016

Hi

I am pretty new to Sharepoint and have just bought Form designer and Plumsail lookup.

I am trying to create a Cascading lookup, but I can't get it to work, we have a list that is updated from our ERP system every night with data on our employees

Names

Group

User ID number

Birthday

and so on...



we have a request vacation calendar where I would like the user to start pick their Group from the Group column and then when they choose name they only see names in that group, is there anyone that could help me getting this to work

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

08 Jul 2016

Hi,

Please, read the following post:
http://spform.com/forms-designer- ... office-365

soylant
Posts: 9
Joined: Wed Jul 06, 2016

08 Jul 2016

Hi



I have read that thread, but I get "Loading faild"

here are my Request item:

function (term, page) {

// Getting the selected country

var GruppeId = fd.field('Gruppe').value();

if (!GruppeId) {

GruppeId = 0;

}



// Filtering by the selected country

if (!term || term.length == 0) {

return "{WebUrl}/_api/web/lists('{ListId}')/items?$select=Id,{LookupField},Gruppe/Id&$orderby=Created desc&$expand=Gruppe/Id&$filter=Gruppe/Id eq " + GruppeId + "&$top=10";

}

return "{WebUrl}/_api/web/lists('{ListId}')/items?$select=Id,{LookupField},Gruppe/Id&$orderby={LookupField}&$expand=Gruppe/Id&$filter=startswith({LookupField}, '" + term + "') and Gruppe/Id eq " + GruppeId + "&$top=10";

}



and here is my script in formdesigner

fd.field('Gruppe').change(function() {

fd.field('Navn').value(0);

});

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

11 Jul 2016

Please, open the browser console (F12) and expand the drop-down. Next, provide the content of the console.

soylant
Posts: 9
Joined: Wed Jul 06, 2016

11 Jul 2016

this is what i have

SCRIPT1002: Der er en syntaksfejl

fd_Begivenhed_New.aspx (526,4)

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

12 Jul 2016

Hi,

Your code looks correct. Are you sure that you don't have other custom code in this form? You can find the syntax error here:

fd_Begivenhed_New.aspx (526,4)

If it is possible, provide temporary access to the form and we will assist you with the issue. Send the credentials to support@spform.com.

soylant
Posts: 9
Joined: Wed Jul 06, 2016

12 Jul 2016

Hi



No I have no custom code at all.

I was wondering could it be because both my column is coming from another list?

As I mention I have a list with all my employees, and I then created a new list, where I want to cascading from 2 columns on my employee list

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

13 Jul 2016

As I can see from the console, you have a syntax error in your code:

SCRIPT1002: Der er en syntaksfejl
fd_Begivenhed_New.aspx (526,4)

That's why JS-code does not work. Could you provide HTML-source of the form page?

soylant
Posts: 9
Joined: Wed Jul 06, 2016

13 Jul 2016

hi

Just tried Chrome instead of IE and here I have another error code from console

GET http://intra-01/_layouts/15/plumsail/cr ... e_da_dk.js

GET http://intra-01/personale/_api/web/list ... 8402132040 400 (Bad Request)

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

13 Jul 2016

Copy the complete URL from the second error:

GET http://intra-01/personale/_api/web/list ... 8402132040 400 (Bad Request)
Make sure that you use the correct internal names of fields.

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 8 guests