ContributionsMost RecentMost LikesSolutionsRe: api edit with htmlThe user must add the information to modify it within the registry and they are multiple records as in the code that sends nothing more that does not add but update or modify it ------------------------------ Mariela Vasquez ------------------------------ Re: api edit with htmlI have already reviewed the codes there, they are functional but the examples are only from one record and I need to modify at least 5 at the same time and the codes they published do not allow that ------------------------------ Mariela Vasquez ------------------------------ api edit with htmlThis is my code, previously what I was doing was adding a record, now what I need is to edit the records but I don't know how to get the record id to modify the record from where the page is called. <!DOCTYPE html> <html lang="es"> <head> <meta charset="utf-8" /> <title> Tickets de Mantenimiento </title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <div class="allrequired"> <body class="blurBg-false" style="background-color:#EBEBEB"> <link rel="stylesheet" href="https://qb.veinsamotors.com/files/venisacrm/files/skyblue.css" type="text/css" /> <script type="text/javascript" src="https://qb.veinsamotors.com/files/venisacrm/files/jquery.min.js"></script> <!-----------<script> var urlParams = new URLSearchParams(window.location.search); const urlParams.get("a"); // "dbpage" const urlParams.get("pagename"); // "InvoicePDF.html" const urlParams.get("rid"); // value of [Record ID#] console.log(rid); let urlParams.get("rid"); document.getElementById("rid").textContent = `Edit Record # ${rid}`; </script> ------------> <form name=qdbform method="post" onsubmit='return validateForm(this)' encType='multipart/form-data' action=https://veinsacr.quickbase.com/db/brczq73ui?act=API_EditRecord&apptoken=cq3k57cd4jgeyucgn8nhwc3tiicj; class="formoid-default-skyblue" style="background-color:#FFFFFF;font-size:14px;font-family:'Open Sans','Helvetica Neue','Helvetica',Arial,Verdana,sans-serif;color:#666666;max-width:480px;min-width:150px" > <a href="https://veinsacr.quickbase.com/db/brczq73ui"><img src="https://qb.veinsamotors.com/files/venisacrm/images/ico.png" width="55" height="70"></a> <div align="center"><img src="http://qb.veinsamotors.com/Cloud/Logos/AGEHolding/CINTILLO-LOGOS-AGE-HOLDING.jpg" width="300" height="100"></div> <p> <h2>TICKETS MANTENIMIENTO</h2> <!--------------------------------------------------- nombre -------------------------------------------> <input type=hidden name=fform value=1> <div class="element-input"><label class="title">Nombre Completo</label> <input class="medium" type="text" name="_fid_6" required /></div> <!------------------------------------------------- Departamento ---------------------------------------> <input type=hidden name=fform value=1> <div class="element-input"><label class="title">Departamento</label> <input class="medium" type="text" name="_fid_9" required /></div> <!--------------------------------------------- Numero de telefono -------------------------------------------> <!--------------------------------------------- Email -------------------------------------------> <input type=hidden name=fform value=1> <div class="element-input"><label class="title"> Correo </label> <input class="medium" type="text" name="_fid_10" required /></div> <!-------------------------------------------- Clasicacion del trabajo ---------------------------> <label for="start">Fecha limite de Entrega:</label> <input type="date" id="start" name="_fid_12" value="08-12-2020" min="01-01-2020" max="12-31-2020"> <!--------------------------------------------Java de Fecha ---------------------------> <!--------------------------------------------Numero random ---------------------------> <input class="medium" type="textarea" id="demo" name="_fid_23" style="visibility:hidden" /> <input class="medium" type="text" id="Nuevo" name="_fid_30" style="visibility:hidden" /> </div><span class="clearfix"></span> </div> <input type=hidden name=rdr value='https://veinsacr.quickbase.com/db/bp8bfx5e3?a=dbpage&pageID=8'> <input class="submit" type=submit value=Guardar onClick="mi_alerta()"> </form> <script type="text/javascript" src="venisacrm/files/skyblue.js"></script> <script lang="javascript"> function CheckForOther (item, origlen) { var sitem = item.options[item.selectedIndex]; if (item.selectedIndex == (item.length - 1)) { var val = prompt ("ADD A NEW CHOICE:", ""); if (val == null) item.selectedIndex = 0; else { var slen = item.length; if (slen == origlen+1){ item.options[slen] = new Option (sitem.text, sitem.value); } item.options[item.length-2].text = val; item.options[item.length-2].value = val; item.selectedIndex = item.length-2; } } } </script> <script lang=javascript> function validateForm(theForm) { } function mi_alerta () { alert ("Registro Guardado"); windows.location = 'https://veinsacr.quickbase.com/db/bm7n7yjim?a=dbpage&pageID=6'; } </script> <script> document.getElementById("demo").value = Math.random()* 100000 * 3.14159265359; </script> </body> </html> ------------------------------ Mariela Vasquez ------------------------------ Re: Pop upI understand that natively it is not possible, but with HTML and CSS it is possible? ------------------------------ Mariela Vasquez ------------------------------ Re: Pop upwhat I need the pop-up window to do is that when it takes the user to an external page it appears as a pop-up window not as a tab, where it enters the data that is requested, and when saving it returns to the initial page ------------------------------ Mariela Vasquez ------------------------------ Pop uphow to create a pop up in quickbase without javascript? ------------------------------ Mariela Vasquez ------------------------------ Re: add more actions to the codeIt was not done like that since visually it is not pretty and also in many we need to use a refresh or only use a pop up, that is why we want to use external code ------------------------------ Mariela Vasquez ------------------------------ Re: add more actions to the codeWhat I need the button to do is that it opens a page where the user enters a value, chooses a date (I need a calendar to be lowered so that he chooses the date), and enters a name, when the information is saved in the record of quickbase also need a check to be marked, save the date of the day the user added the information In addition to saving the information that the user entered in the specific fields, I need to find a way to do this without Java, I hope I have explained myself better ///EXAMPLE JAVA/// $("a.QBU_Modificar").on("click", function(event) { var rid = this.dataset.rid; var now = this.dataset.now; var user = this.dataset.user; var notas = this.dataset.notas; var markup = ''; markup += '<table>'; markup += ' <tr>'; markup += ' <img src=https://images.quickbase.com/si/24/078-calendar2.png ></a>'; markup += ' </tr>'; markup += ' <tr>'; //markup += ' <td><label for=QBU_BaseDate><b>Fecha Propuesta</b></label></td>'; markup += ' <td><label for=QBU_Hora><b>Hora Propuesta</b></label></td>'; markup += ' </tr>'; markup += ' <tr>'; //markup += ' <td><input id=QBU_BaseDate name=QBU_BaseDate type=text></td>'; markup += ' <td>'; markup += ' <select name=QBU_Hora id=QBU_Hora>'; markup += ' <option>8:00 am</option>'; markup += ' <option>8:30 am</option>'; markup += ' <option>9:00 am</option>'; markup += ' <option>9:30 am</option>'; markup += ' <option>10:00 am</option>'; markup += ' <option>10:30 am</option>'; markup += ' <option>11:00 am</option>'; markup += ' <option>11:30 am</option>'; markup += ' <option>12:00 pm</option>'; markup += ' <option>12:30 pm</option>'; markup += ' <option>1:00 pm</option>'; markup += ' <option>1:30 pm</option>'; markup += ' <option>2:00 pm</option>'; markup += ' <option>2:30 pm</option>'; markup += ' <option>3:00 pm</option>'; markup += ' <option>3:30 pm</option>'; markup += ' <option>4:00 pm</option>'; markup += ' <option>4:30 pm</option>'; markup += ' <option>5:00 pm</option>'; markup += ' <option>5:30 pm</option>'; markup += ' <option>6:00 pm</option>'; markup += ' <option>6:30 pm</option>'; markup += ' <option>7:00 pm</option>'; markup += ' <option>7:30 pm</option>'; markup += ' <option>8:00 pm</option>'; markup += ' </select>'; markup += ' <td>'; markup += ' </tr>'; markup += ' <tr>'; markup += ' </tr>'; markup += ' <tr>'; markup += ' <td><label for=QBU_Motivo><b>Motivo</b></label></td>'; markup += ' <td>'; markup += ' <select name=QBU_Motivo id=QBU_Motivo>'; markup += ' <option>Accesorios</option>'; markup += ' <option>Banco</option>'; markup += ' <option>Carroceria Camion</option>'; markup += ' <option>Cliente</option>'; markup += ' <option>Credito y Cobro</option>'; markup += ' <option>Formalizacion</option>'; markup += ' <option>Gerencia</option>'; markup += ' <option>Licitaciones</option>'; markup += ' <option>Logistica</option>'; markup += ' <option>Seguros</option>'; markup += ' <option>Taller</option>'; markup += ' <option>Traslado</option>'; markup += ' <option>Vendedor</option>'; markup += ' <option>Otro</option>'; markup += ' </select>'; markup += ' <td>'; markup += ' </tr>'; markup += ' <tr>'; markup += ' <td><label for=QBU_Observaciones><b> Observaciones </b></label></td>'; markup += ' <td><input id=QBU_Observaciones name=QBU_Observaciones type=text></td>'; markup += ' </tr>'; markup += '</table>'; $("<div id=QBU_NoDialog>").dialog({ title: "Modificacion de Solicitud de Agenda", modal: true, width: 400, resizable: false, buttons: { OK: function() { var basedate = $("#QBU_BaseDate").val(); var basehour = $("#QBU_Hora").val(); var frequency = $("#QBU_Motivo").val(); var number = $("#QBU_Observaciones").val(); $(this).dialog("close"); $("#QBU_Dialog").remove(); var csvData = ""; require(["moment"], function(moment){ var d = moment(basedate); $.post(dbidParents, { act: "API_EditRecord", rid: rid, _fid_70: basedate, //Nueva fecha propuesta (en el campo de fecha original) _fid_69: basehour, //Nueva hora propuesta (en el campo de hora original) _fid_81: 0, //Aprobacion de agenda _fid_106: "", //Fecha de aprobacion _fid_173: "", //Usuario que aprobó _fid_82: 1, //Modificacion de agenda _fid_176: frequency, //Modificacion de agenda - Motivo _fid_177: number, //Modificacion de agenda - Notas _fid_67: "Modificacion de fecha/hora de entrega a : " + basedate + " " + basehour, _fid_92: notas, }).then(function(xml) { console.log(xml); // document.location.href = dbidParents + "?a=dr&rid=" + rid ; $("a.QBU_Modificar").parent().html("Modificado!"); ------------------------------ Mariela Vasquez ------------------------------ Re: add more actions to the codeThe url is not failing me, what I would like to know is if within that code and the code of the page is like this, the code was published by QuickBase when they announced that the Javascript of the buttons was going to stop working, what I need is to be able to create more than 2 fields where the user writes and the information is pasted in the defined field. the button's code var text urlToExecute = URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" & [Token] & "&rid=" & [Record ID#] & "&_fid_7=" ; URLRoot() & "db/" & AppID() & "?a=dbpage&pageid=6" // Open code page 289 & "&url=" & URLEncode($urlToExecute) // Pass in the URL to execute the code of the page is the first one I publish ------------------------------ Mariela Vasquez ------------------------------ Re: add more actions to the codeI need the moment to be saved in addition to storing the information that was entered, mark a check field as true, that the date on which that happened is saved, the username of the person who is making the change and copy the information from one field to another ------------------------------ Mariela Vasquez ------------------------------