Cascading

rss

Posted by soylant - Jul 7 ’16 at 03:59

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

 

 

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 7 years 9 days
    #1 by Dmitry Kozlov Jul 8 ’16 at 08:34
  • soylant
    Member
    Member for: 4 years 2 months 24 days
    #2 by soylant Jul 8 ’16 at 02:12

    [#1]: 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);

    });

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 7 years 9 days
    #3 by Dmitry Kozlov Jul 11 ’16 at 03:13

    [#2]: Please, open the browser console (F12) and expand the drop-down. Next, provide the content of the console.

  • soylant
    Member
    Member for: 4 years 2 months 24 days
    #4 by soylant Jul 11 ’16 at 01:28

    [#3]:

    this is what i have

    SCRIPT1002: Der er en syntaksfejl

    fd_Begivenhed_New.aspx (526,4)

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 7 years 9 days
    #5 by Dmitry Kozlov Jul 12 ’16 at 02:56

    [#4]: 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 [email protected]

  • soylant
    Member
    Member for: 4 years 2 months 24 days
    #6 by soylant Jul 12 ’16 at 04:14

    [#5]: 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

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 7 years 9 days
    #7 by Dmitry Kozlov Jul 13 ’16 at 04:22

    [#6]: 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
    Member
    Member for: 4 years 2 months 24 days
    #8 by soylant Jul 13 ’16 at 04:35

    [#7]: hi

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

    GET http://intra-01/_layouts/15/plumsail/crosssitelookup/select2/select2_locale_da_dk.js

    GET http://intra-01/personale/_api/web/lists('726f8f21-1fc7-42c9-bea2-9dc11398e…c&$expand=Gruppe/Id&$filter=Gruppe/Id%20eq%2027309&$top=10&_=1468402132040 400 (Bad Request)

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 7 years 9 days
    #9 by Dmitry Kozlov Jul 13 ’16 at 04:57

    [#8]: Copy the complete URL from the second error:

    GET http://intra-01/personale/_api/web/lists('726f8f21-1fc7-42c9-bea2-9dc11398e…c&$expand=Gruppe/Id&$filter=Gruppe/Id%20eq%2027309&$top=10&_=1468402132040 400 (Bad Request)
    

    Make sure that you use the correct internal names of fields.

  • soylant
    Member
    Member for: 4 years 2 months 24 days
    #10 by soylant Jul 13 ’16 at 07:51

    [#9]: hi

    this is the complete URL http://intra-01/personale/_api/web/lists('726f8f21-1fc7-42c9-bea2-9dc11398e556')/items?$select=Id,Gruppe,Gruppe/Id&$orderby=Created%20desc&$expand=Gruppe/Id&$filter=Gruppe/Id%20eq%200&$top=10&_=1468413963057

     

    I’m sure that I am using the correct internal name of the column.

     

    I get the name of the column by going to the list and edit the column and then see the URL and find the name here, is that not the right name?

Displaying 1 to 10 of 16 messages
Previous12