Forum Discussion
MarielaVasquez
5 years agoQrew Member
I 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
------------------------------
------------------------------
Mariela Vasquez
------------------------------
AustinK
5 years agoQrew Commander
It is sort of hard to tell what the code above is even trying to do.. Is this the entire code with nothing removed? If so how is the user arriving here and what output does the code have where you are saying it only does one action? If you can post a sanitized version of the output URL that is failing it might really help determine where the issue is. You should be able to update several fields at once.
You have all the data you are sending in the URL already so you could also create a second payload to send it all in one tidy bundle to the field you would like everything copied to as well. There are multiple ways you might do this though.
You have all the data you are sending in the URL already so you could also create a second payload to send it all in one tidy bundle to the field you would like everything copied to as well. There are multiple ways you might do this though.
- MarielaVasquez5 years agoQrew MemberThe 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
------------------------------- MarkShnier__You5 years ago
Qrew Legend
Maria,
You are probably way over complicating this.
Can you take a step back and explain in words what you are trying to do. What is the button supposed to do.
Are you just trying to execute some URLs and then refresh the page? If so then there is a much simpler way.
Do you have an existing code that uses Java script that you are trying to replace? If so please post that code.
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------- MarielaVasquez5 years agoQrew MemberWhat 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
------------------------------