how to retrieve only searched objects and assign it to newObject

0
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
asked
2 answers
1

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;

  1. In this context object SearchCommand, you add all the attributes of the Location object you want to be able to search on;
  2. Add an association from the SearchCommand object to the GoogleMaps.Location object;
  3. 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;
  4. At the end of this Microflow add a refresh on the SearchCommand entity;
  5. Add the GoogleMaps widget with above mentioned XPath: [Location_SearchCommand=[%CurrentObject%]]
  6. In the GoogleMaps widget, make sure it 'listens' to the entity refresh mentioned in line 4 above.

 

Good luck!

 

answered
0

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%]]

answered