You need to sign in to do that
Don't have an account?
Ola Bamidele
How to add filter to Account List
Hi All,
I this code that displays locations on a map when you click the account name in the account list at the bottom of the page.
So I was wondering, is it possible to add a filter to the list? So maybe it can be sorted in alphabetical order or filter the account based on something?
Please if you know how then please let me know please!
This is my code:
Thank you very much!
I this code that displays locations on a map when you click the account name in the account list at the bottom of the page.
So I was wondering, is it possible to add a filter to the list? So maybe it can be sorted in alphabetical order or filter the account based on something?
Please if you know how then please let me know please!
This is my code:
({ jsLoaded: function(component, event, helper) { var map = L.map('map', {zoomControl: false, tap: false}).setView([37.784173, -122.401557], 14); L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}', { attribution: 'Tiles © Esri' }).addTo(map); component.set("v.map", map); }, accountsLoaded: function(component, event, helper) { // Add markers var map = component.get('v.map'); var accounts = event.getParam('accounts'); for (var i=0; i<accounts.length; i++) { var account = accounts[i]; var latLng = [account.Location__Latitude__s, account.Location__Longitude__s]; L.marker(latLng, {account: account}).addTo(map) // To display account name and status in the text balloon .bindPopup(account.Name); } }, accountSelected: function(component, event, helper) { // Center the map on the account selected in the list var map = component.get('v.map'); var account = event.getParam("account"); map.panTo([account.Location__Latitude__s, account.Location__Longitude__s]); } })
Thank you very much!
Thanks very much