Jump to content

guardmetrics

Members
  • Posts

    13
  • Joined

  • Last visited

Recent Profile Visitors

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

guardmetrics's Achievements

  1. @LittleMsGinger I've got this working great, but images are showing correct orientation in report, but rotated in PDF export, any ideas?
  2. Still struggling with this, here is where I am now: <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { var lat1 = document.getElementById("InsertRecordLat").value; var lon1 = document.getElementById("InsertRecordLng").value; var lat2 = document.getElementsByName("cbParamVirtual6”)[0].value; var lon2 = document.getElementsByName("cbParamVirtual7”)[0].value; var R = 6371; // km var dLat = (lat2-lat1)*Math.PI/180; var dLon = (lon2-lon1)*Math.PI/180; var a = Math.sin(dLat/2) * Math.sin(dLat/2) + Math.cos(lat1*Math.PI/180) * Math.cos(lat2*Math.PI/180) * Math.sin(dLon/2) * Math.sin(dLon/2); var c = 2 * Math.asin(Math.sqrt(a)); var d = R * c; d= (d*1000); //in meters document.getElementById("InsertRecordDistance”).value=d; }); </SCRIPT>
  3. Does anyone have a Haversine Function that works? I'm having trouble, and this is where i'm at: <script type="text/javascript"> document.addEventListener('BeforeFormSubmit', function(event) { function f_Haversine_Roving(){ var lat1 = document.getElementById("InsertRecordLat").value; var lon1 = document.getElementById("InsertRecordLng").value; var lat2 = document.getElementsByName("cbParamVirtual6”)[0].value; var lon2 = document.getElementsByName("cbParamVirtual7”)[0].value; var R = 6371; // km var dLat = (lat2-lat1)*Math.PI/180; var dLon = (lon2-lon1)*Math.PI/180; var a = Math.sin(dLat/2) * Math.sin(dLat/2) + Math.cos(lat1*Math.PI/180) * Math.cos(lat2*Math.PI/180) * Math.sin(dLon/2) * Math.sin(dLon/2); var c = 2 * Math.asin(Math.sqrt(a)); var d = R * c; d= (d*1000); //in meters document.getElementById("InsertRecordDistance").value=d; document.getElementById("caspioform").onsubmit=f_Haversine_Roving();} }); </SCRIPT>
  4. @Hastur This is working great. The only thing is that it is showing time like this " 8:0" instead of "8:00". Any idea on how to get it to show 2 digits to the right of the colon?
  5. I have a table which includes a timestamp and a type field (among others) I've created triggers and a view that combines this table into itself and displays a clock-in time, clock-out time, and a total time difference between them in HH:MM format. The formula in the calculated field is below: CONVERT(varchar(5), DATEADD(minute, DATEDIFF(minute, [@field:Patrol_Activity_Database_Date], [@field:Patrol_Activity_Database_1_Date]), 0), 114) My issue is that I need to have a total/aggregate for this field, but it gives an invalid error if I just do sum, and I've been unable to figure out how to get it to add the time and display it in the HH:MM format. Any help would be great!
  6. I'm working on a mobile app that will be using APIs to submit data into Caspio. My main obstacle is authentication. I have found the article regarding "Caspio Authentication as an ID service", my question is regarding this is the solution to allowing my native app Authenticate with Caspio as the authentication source. Any thoughts/experience/etc. appreciated!
  7. Nevermind! I figured it out. Will post for reference for others: <style> .cbSearchButtonContainer { display: none !important; } </style>
  8. I am using a search field that is above the results, and the button being below the form takes up precious vertical space on the page. It would look SO much better having the button to the right of the search field. I've included a screenshot showing where button is, and where I'd like it to be. I've got the button in the form on the right by putting the button code in an HTML block, but if I hide the submit button it hides both.
  9. I'm working on putting a formula field in my table that will count all records in a separate view. (i.e. Subscribed Users = # of records in a filtered view If someone could point me in the right direction for this CASE statement, that would be amazing!!
×
×
  • Create New...