how to retrieve only searched objects and assign it to newObject
Hi, i am working on google maps integration in which i have to search by location. so the resulted locations should show in maps. i am unable to do this i added google maps widget, and it is showing all the locations which are in Location object. i want to only show searched object locations. Thank you
The default Mendix search functionality for datagrids can not be extended to the GoogleMaps widget as far as I know. A listen-to-grid (so only one record) will work, though.
To get this working for a selection I created something similar to what Chris is mentioning.
Steps to take;
In this context object SearchCommand, you add all the attributes of the Location object you want to be able to search on;
Add an association from the SearchCommand object to the GoogleMaps.Location object;
Add a Microflow that, based on the filters set by the end-user, retrieves the correct GoogleMaps.Location objects and associate them to the SearchCommand object. This will be the Microflow to add on a button in the DataView of the SearchCommand object, triggering this custom search;
At the end of this Microflow add a refresh on the SearchCommand entity;
Add the GoogleMaps widget with above mentioned XPath: [Location_SearchCommand=[%CurrentObject%]]
In the GoogleMaps widget, make sure it 'listens' to the entity refresh mentioned in line 4 above.
You can add a SearchCommand object as context and add an assocation between SearchCommand and Location. In the googlemaps set the xpath to [Location_SearchCommand=[%CurrentObject%]]