0

Need Transfer only the last Date.

I'm trying to modify this script so that it only transfer the last of the three Rev Date.

In this example it transfers doc with Rev B, not transfer Rev A, or is I have Rev 0 no transfer neither Rev A, Rev B

let signIn := this;
let reply := dialog(" Documento a  Transferir", " Se Transferira el Documento ?", ["Confirmar", "No Confirmar"]);
if reply = "Confirmar" then
    let newRecord := (create Revisiones);
    newRecord.(CodDoc := signIn.text(CodDoc));
    newRecord.(Documento := signIn.Documento);
    newRecord.(Disciplina := signIn.Disciplina);
    newRecord.('Rev A' := signIn.'Rev A');
    newRecord.('Rev B' := signIn.'Rev B');
    newRecord.('Rev 0' := signIn.'Rev 0');
    alert("Documento  Transferido");
    openRecord(newRecord)
end

3 replies

null
    • szormpas
    • 4 days ago
    • Reported - view

     Hi, try the following:

    let signIn := this;
    let reply := dialog(" Documento a  Transferir", " Se Transferira el Documento ?", ["Confirmar", "No Confirmar"]);
    if reply = "Confirmar" then
        let newRecord := (create Revisiones);
        newRecord.(CodDoc := signIn.text(CodDoc));
        newRecord.(Documento := signIn.Documento);
        newRecord.(Disciplina := signIn.Disciplina);
        if 'Rev 0' then
           newRecord.('Rev 0' := signIn.'Rev 0');
           else if 'Rev B' then
             newRecord.('Rev B' := signIn.'Rev B');
             else if 'Rev A' then
             newRecord.('Rev A' := signIn.'Rev A');
        end;
        alert("Documento  Transferido");
        openRecord(newRecord)
    end (empty)
      • Rafael Sanchis
      • Rafael_Sanchis
      • 4 days ago
      • Reported - view

       

      Hi again, work 👍 but need to add the alert in each Rev if this is possible.

    • Rafael Sanchis
    • Rafael_Sanchis
    • 4 days ago
    • Reported - view

    Excellent and fast, Thanks you.👍

Content aside

  • Status Answered
  • 4 days agoLast active
  • 3Replies
  • 16Views
  • 2 Following