# guardmetrics

Members

13

## Recent Profile Visitors

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

1. ## Files in Calculated Fields

@LittleMsGinger I've got this working great, but images are showing correct orientation in report, but rotated in PDF export, any ideas?
2. ## Passing field values with ampersand (&) over query String

How would this be done in a link from a details page?
3. ## Distance between 2 sets of coordinates Haversine Function

@Hastur @Vitalikssssssany ideas?
4. ## Distance between 2 sets of coordinates Haversine Function

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>
5. ## Distance between 2 sets of coordinates Haversine Function

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>
6. ## Display aggregate of total time as HH:MM

@HasturThanks so much! How do you make this work in the aggregate?
7. ## Display aggregate of total time as HH:MM

@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?
8. ## Display aggregate of total time as HH:MM

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!
9. ## Caspio Authentication as an ID service

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!
10. ## Move submit button to right of field instead of below form

Nevermind! I figured it out. Will post for reference for others: <style> .cbSearchButtonContainer { display: none !important; } </style>
11. ## Move submit button to right of field instead of below form

Thank you! How do I hide the container?
12. ## Move submit button to right of field instead of below form

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.
13. ## COUNT CASE statement in Formula field in table

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!!
×