Home › Forums › Cascading dropdowns › Cascading dropdowns – EXTERNAL LIST
- This topic has 8 replies, 2 voices, and was last updated 5 years, 6 months ago by Alexander Bautz.
-
AuthorPosts
-
-
November 30, 2015 at 13:59 #9425
Hi Alex, I try to config the Cascading dropdowns for an external list, but does not work.
-
November 30, 2015 at 22:27 #9440
Hi,
I have actually not used external list myself, but If I remember correctly, it should work if you add a field “ID” to your external list (the “id” column of an external list is not called ID, but the script expects this column).Let me know if you manage to get it working.
Alexander
-
December 11, 2015 at 22:31 #9551
Exacly, I tryed to add a field “ID” in my external list but it does not appears.
-
December 12, 2015 at 00:43 #9569
I’ll check with someone that I believe have set this up successfully and post back here.
Alexander
-
December 14, 2015 at 22:04 #9603
No problem.Thanks
-
January 5, 2016 at 08:30 #9748
Sorry for the delay. I checked with the person who I know have used external lists a lot, and this is his feedback. I hope this will help you.
I have used external lists a lot.
Basically this is how they work:Lets say you have a table (entity) in SQL database.
Say “Contacts” and you have ID, First Name, Last Name, Address.
Now, ID is the identity field (unique field) so that you can uniquely identify a record.Using BCS (Business Connectivity Services) in Sharepoint, you can connect to SQL (or any other record source) and link the “Contacts” table, and surface/expose it as a list within Sharepoint.
During the configuration process, you have option to map the fields. You also have the option to identify the identity/unique columns.
Other than that, no. you don’t have to add a column that is not originally in the source. All the columns in the External list come from the external source.
Does that help?
Gilbert
-
May 14, 2019 at 13:29 #25271
Good morning Alex.
I would like to use an API as a dataSourceArray in cascading-dropdown solution.
My API returns an Array, but when I try to use it, this is my console log in attachment.
This is my codevar dataSourceArray; $.ajax({ url:"/api/sp/rfids/permitidos", success: function(json) { // Do stuff with data dataSourceArray = json; console.log(dataSourceArray); }, error: function(e) { console.log(e); } }); spjs.casc.init( { "manualMode":true, "dataSource":dataSourceArray, "lookupList":"", "lookupListBaseUrl":"", "lookupListFields":["Title"], "thisListFields":["DS_REDE"], "dropDownDefaultvalue":"Select...", "filter":"", "hideEmptyDropdowns":false, "autoselectSingleOption":true, "clearInvalidSelection":false, "addOwnValue":false, "addOwnValueMouseover":"", "cancelOwnValueMouseover":"", "sideBySide":true, "debug":false } );
Attachments:
-
May 14, 2019 at 14:59 #25277
I find out. The “spjs.casc.init” function must be inside ajax, as it is asynchronous. Has a delay on get API’s reponse.
My code
$.ajax({ url:"/api/sp/rfids/permitidos", success: function(json) { spjs.casc.init( { "manualMode":true, "dataSource":json, "lookupList":"", "lookupListBaseUrl":"", "lookupListFields":["NM_FUNCIONARIO"], "thisListFields":["DS_REDE"], "dropDownDefaultvalue":"Select...", "filter":"", "hideEmptyDropdowns":false, "autoselectSingleOption":true, "clearInvalidSelection":false, "addOwnValue":false, "addOwnValueMouseover":"", "cancelOwnValueMouseover":"", "sideBySide":true, "debug":false } ); }, error: function(e) { console.log(e); } });
-
May 15, 2019 at 15:59 #25283
I’m glad you figured it out.
Alexander
-
-
-
AuthorPosts
- You must be logged in to reply to this topic.