Jump to content

mhand

Members
  • Content Count

    2
  • Joined

  • Last visited

About mhand

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hello, I have the need to search a directory of service providers. In the directory I have the lat/long of each provider in two fields (geo_lat, geo_long). I have another table that is "cities". In there, the center of each city is also coded with geo_lat and geo_long. I want to have a user be able to type in the name of a city and have it lookup the geo_lat and geo_long of that city and use them in a radius search of the service provider directory. I cannot use addresses or zip codes because we are a confidential hotline that does not collect that type of information for safety purposes. I can do the lookup of the city and find the lat/long values, but I don't know how to pass them to the Distance Search Center Lat and Center Long fields. Suggestions? In my searching around I thought that by using this snippet of code in an HTML block it might work. The idea is that the Virtual4 field is populated with the latitude of the city and the Virtual5 field is populated with the longitude of the city. I am then trying to set the value of the 2 distance search fields (cbDSField1 and cbDSField2) to those two values. I am using the onchage trigger instead of on-submit in the hopes I would be able to see the values populate in all four fields. It just isn't working. What am I doing wrong??? <SCRIPT LANGUAGE="JavaScript"> <script> function searchGeo() { let search_lat = document.getElementByID('cbParamVirtual4').value; document.getElementByID('InsertRecordcbDSField1').value = search_lat; let search_long = document.getElementByID('cbParamVirtual5').value; document.getElementByID('InsertRecordcbDSField2').value = search_long; } document.getElementById('caspioform').onchange = searchGeo; </script>
  2. Good day, I have 3 tables (Directory, Interaction, Referrals). The Directory table is a list of resources and providers. Interaction is details about a specific interaction my team has with a caller. Referrals is a simple table that contains 3 fields (Directory_ID, Interaction_ID, Refer_Time) and is intended to track all of the times a specific entry in the Directory is referred to one of the callers from an interaction. In a single interaction we can refer anywhere from 0 to 10 resources and those resources can be referred to any number of different Interactions. I would like to build a search form of the Directory where the details page of the results would have a button that when it is pressed, it creates a new record in the Referrals table that contains the Directory_ID of the resource being viewed, the Interaction_ID that has been passed to the search datapage through an external parameter, and the timestamp of when the button was clicked. I'm stuck....Does anyone here have an idea how to accomplish this? Thanks Marty
×
×
  • Create New...