ContributionsMost RecentMost LikesSolutionsRe: Geolocation and form fieldsIt sounds like the issue may reside within the JavaScript source code. There are a few things you can do to makesure everything is running correctly. 1. Make sure location services are turned on within your browser. 2. Try changing the field type to text (as it will capture any value) 3. Debug your source code. - Add some "console.log();" lines to your source code to see if position.coords.latitude/longitude is working. - Open the browser console (F12 for most broswers) before running the script to view any logs. If all else fails there are other resources on the web to help with JavaScript/jQuery. Here are a couple of popular sites: - JavaScript:https://developer.mozilla.org/en-US/docs/Web/JavaScript - jQuery:https://jquery.com/ Best of luck!Re: Geolocation and form fieldsHey Jason, Awesome, the hard part is over then :-) Since you are using the Record ID# I would recommend using "&rid" instead of "&key". Its a subtle difference, but its important. However, when adding a record the "&rid" and "&key" parameters are unnecessary (since a key value has not been assigned yet). Below are examples on how to setup an Edit Record and anAdd Record function. /* Edit an existing record */ function showPosition(position){ vareditURL = "bnifp6kni"; editURL += "?a=API_EditRecord&rid=" + QBU_recid; editURL += "&_fid_13=" + position.coords.latitude; editURL += "&_fid_14=" + position.coords.longitude; editURL += "&apptoken=YOUR_TOKEN_HERE"; $.ajax({url: editURL,async:false}); location.reload(true); } /* Add a new record */ function showPosition(position){ varaddURL = "bnifp6kni"; addURL+= "?a=API_AddRecord"; addURL += "&_fid_13=" + position.coords.latitude; addURL += "&_fid_14=" + position.coords.longitude; addURL += "&apptoken=YOUR_TOKEN_HERE"; $.ajax({url: addURL,async:false}); location.reload(true); }Re: Geolocation and form fieldsHi Jason, A couple of things to look out for when copying an app is to make sure DBIDs and field IDs are updated. Have you updated the following to match your new app? I also notice that the call is using the "&key" parameter in the request. Is your table using the standard Record ID# as the key field, or has a different field been assigned as the key? -Ryan function showPosition(position){ var editURL = ""; editURL = "bnifp6kni"; editURL += "?act=API_EditRecord&key=" + QBU_recid; editURL += "&_fid_13=" + position.coords.latitude; editURL += "&_fid_14=" + position.coords.longitude; $.ajax({url: editURL,async:false}); location.reload(true); } "javascript:" & "var QBU_recid="& [Record ID#] &";" & "void(jQuery.getScript('" & URLRoot() & "db/bmic8pqiv?act=dbpage&pagename=geo.js'))" Re: Javascript SDK - Copy Parent and Child records to two new tablesThe QuickBaseClient.js SDK can be implemented within your .js file by using jQuery. This is of course assuming that you are referencing the script directly from your button. To do this, add your code between the following. $(document).ready(function(){ $.getScript("/js/QuickBaseClient.js", function(){ // your code here }); });Re: How do I simplify this formulaHi Shontay, I'm not sure if this shortens the code, but it may make it a little more readable. By adding more variables it also makes it easier to update the code in the future (e.g. adding more lines of code or making adjustments). Let me know if this helps! var text urlRoot = URLRoot() & "db/"; var text projTbl = $urlRoot & [_DBID_PROJECTS]; var text openUrl = $projTbl & "?a=dr&rid=" & [Related Project - From Job] & "&dfid=17" & Rurl(); var text sendUrl = $projTbl & "?a=er&key="& [Related Project - From Job] & "&dfid=17"; var text open = "<a style='text-decoration:none; font-weight:bold' class='Vibrant Success' href='" & $openUrl & '>Open Form</a>"; var text close = "<a style='text-decoration:none; font-weight:bold' class='Vibrant Success' href='" & $sendUrl & "'> Send Form</a>"; If([# of Projects - Building Forms] = 1, $open, $close)Re: Javascript to Copy a Record n number of times and increment a numeric field?Unfortunately, to get around the timeout error JavaScript becomes necessary. I've put together a quick snippet of how the script may look using xhttp. Add a code page titled "MyScript.js" and copy your JavaScript into there. This code was quickly put together and has not been tested. You have been warned :-) Its important you pay attention to the variables you are passing from Quick Base into the script itself. Quick Base variables are passed through the button (see below). The script receives a few variables (including the start month and part of the add record API call). Some useful resources on JavaScript can be found at https://www.w3schools.com. // QuickBase Button var text dbid = "Table ID goes here"; var text apptoken = "App token goes here"; var text addItem = ToText(URLRoot() & "db/" & $dbid & "?a=API_AddRecord&apptoken=" & $apptoken); // **NOTE: This is an incomplete statement. var text itemMonth = ToText([Item Month]); "<a class='Tall Vibrant Snowy' href=\"javascript:var addItem='" & $addItem & "';var itemMonth='" & $itemMonth & "';$.getScript(gReqAppDBID + '?a=dbpage&pagename=MyScript.js');void(0);\">Recurring TTI</a>" // Sample JavaScript var numMonths = prompt("How many items do you want to add?", 1); var monthStart = parseInt(itemMonth, 10); var nextMonth = monthStart + 1; var xhttp; try{ if (window.XMLHttpRequest) { xhttp = new XMLHttpRequest(); } else { // code for IE6, IE5 xhttp = new ActiveXObject("Microsoft.XMLHTTP"); } if(numMonths > 0 && numMonths < 13){ for(var i = 0; i <= numMonths && $nextMonth < 13; i++){ myAPI = addItem + "&_fid_1=" + nextMonth; xhttp.open("GET", myAPI, false); xhttp.send(); nextMonth += 1; } } location.reload(); } catch(e){ console.log("Unexpected Error: " + e); }