Having the option to search from favourite location instead of current location

Hi there.

Apologies if this isn't clear I'll do my best to explain. I've also attached my OML file.

I'm trying to create an option on the FJLocationList page to search FROM a location that I select as a favourite(as you can see with the star option) INSTEAD OF searching from my current location.

How would I do this?

Kind Regards



This filter of yours allows the user to see all the records from FJLocations that are the user favorites or nobody favorites

UserPreferences.UserId = GetUserId() or UserPreferences.Id = NullIdentifier() 

If you use erase the second condition like :

UserPreferences.UserId = GetUserId() 

 The user will see or search only the locations that are in his own favorites. 

Hope this helps 


Stay Safe

Sorry, I hadn't understand. 

First you have to choose/build an action to determine the distance, I believe Google Maps have one but never used it, and from the forge you also have:
    Distance Between Coordinates -> web
    Distance From Coordinate -> mobile

Then process each record ( For each widget) to calculate the distance from the favorite to the location and update the list field. 

Use the "ListFilter" action or the "ListSort" to obtain the locations you want.  

The action should look something like

If you use in the "ListSort" the parameter Ascendind =False the first records will correspond to the nearest locations.

Hope this helps


You must have a list of the favourite locations (UserPreferences) . 

For that new list you can use an aggregate like the one already use in your list, but the filter will be like :

UserPreferences.UserId = GetUserId() 

 The user will see only the locations that are in his own favorites. 

Here in the screen have you the favorite locations ? The User has to have a way to choose the favorite location he or she wants to use. You must have two lists the list of the locations you already have and a list or a combo box with the favorites, so he can choose the one favorite from witch to get the distance to each locations in the other lists . I don't see another way.

The screen could look like (the yellow balloons are my comments)