Page 1 of 2
Cascading
Posted: 07 Jul 2016
by soylant
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
Re: Cascading
Posted: 08 Jul 2016
by Dmitry Kozlov
Re: Cascading
Posted: 08 Jul 2016
by soylant
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);
});
Re: Cascading
Posted: 11 Jul 2016
by Dmitry Kozlov
Please, open the browser console (F12) and expand the drop-down. Next, provide the content of the console.
Re: Cascading
Posted: 11 Jul 2016
by soylant
this is what i have
SCRIPT1002: Der er en syntaksfejl
fd_Begivenhed_New.aspx (526,4)
Re: Cascading
Posted: 12 Jul 2016
by Dmitry Kozlov
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.
Re: Cascading
Posted: 12 Jul 2016
by soylant
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
Re: Cascading
Posted: 13 Jul 2016
by Dmitry Kozlov
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?
Re: Cascading
Posted: 13 Jul 2016
by soylant
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)
Re: Cascading
Posted: 13 Jul 2016
by Dmitry Kozlov
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.