0

Submit Button

Hello All, 

I need a little help I am trying to create an automatic eletronic signature for our contractors, so that when they read a training document they press a 'Sign' button and this will then create a record on a sub table 'SignedList' i have the current formula below within the button, once pressed it creates the record fine.

I then have a second formula in the 'trigger after update' section to prevent the duplication of records in sub table, again this works fine, I then need it to email the user as a reciept for record purposes, it generates the email fine but where the automated field for the 'subject' talk should be is missing.

It inserts the other data but no 'Subject' any ideas?

 

BUTTON FORMULA:

let p := (create SignedList);
let t := TTRef;
let s := 'Toolbox Talk Title Subject:';
let result := dialog("THANK YOU!", "You have signed this tool box talk document and it will be added to our records.", ["OK"]);
p.(Name := userName());
p.(Job := "Test");
p.(Reference := userId() + t);
p.(Subject := s);
p.(Date := now());
p.(Time := now());
p.(Location := longitude(Location));
p.(Loc := latitude(Location));
if result = "OK" then Status := "Signed" end

FORMULA IN TRIGGER AFTER UPDATE TO REFRENCE FIELD IN SUB TABLE:

let myField := Reference;
if cnt(select SignedList where Reference = myField) > 1 then
alert("Our records show that you have already signed this toolbox talk, no duplicate record can be created");
delete this;
sendEmail({
from: "****@****.com",
to: userEmail(),
subject: "Tritec Tool Box Talk Record: " + Reference,
text: "Hi " + Name + " You have tried to submit your electronic signature for a toolbox talk which our records ahow you have already signed, if you feel that you have NOT signed this previously then please contact management, Thank you."
})
else
sendEmail({
from: "****@*****.com",
to: userEmail(),
subject: "Tritec Notification - Tool Box Talk Records",
text: "Thank you " + Name + " for reading and submitting your " + 'Toolbox Talks'.'Toolbox Talk Title Subject:' + " toolbox talk, your unique refrence number is " + Reference
})
end

11 replies

null
    • Mel_Charles
    • 2 yrs ago
    • Reported - view

    Just checked your subject line against all my email setting and it looks valid? So not sure why it is not working

    sendEmail({
    from: myEmail,
    to: 'Email+',
    subject: "Your order has been dispatched by testcompany",
    text: "Goods Dispatched Confirmation",
    html: thisBody,
    attachments: myAtt

    • Terry_Prokopchuk
    • 2 yrs ago
    • Reported - view

    Yeah, I know.

    Not too sure if im trying to add too many fields in the string, the 'Name' field populates and so does the 'reference', but not 'Toolbox Talks'.'Toolbox Talk Title Subject'?

    ive even made some changes as below to see if that works, but still not inserting...

    let X := Subject;
    let myField := Reference;
    if cnt(select SignedList where Reference = myField) > 1 then
    alert("Our records show that you have already signed this toolbox talk, no duplicate record can be created");
    delete this;
    sendEmail({
    from: "****@****",
    to: userEmail(),
    subject: "Tritec Tool Box Talk Record: " + X,
    text: "Hi " + Name + " You have tried to submit your electronic signature for a toolbox talk which our records show you have already signed, if you feel that you have NOT signed this previously then please contact management, Thank you."
    })
    else
    sendEmail({
    from: "****@****.com",
    to: userEmail(),
    subject: "Tritec Notification - Tool Box Talk Records",
    text: "Thank you " + Name + " for reading and submitting your " + X + " toolbox talk, your unique refrence number is " + Reference
    })
    end

     

    EMAIL REPONCE WHEN SENT:

    Thank you Terry for reading and submitting your toolbox talk, your unique refrence number is p465eFKo7cfaYBkrCTT11

     

    Thank you Terry for reading and submitting your ( MISSING 'Subject' Field) toolbox talk, your unique refrence number is p465eFKo7cfaYBkrCTT11

    • Terry_Prokopchuk
    • 2 yrs ago
    • Reported - view

    I think where my formula is creating a new record in 'SignedList' is not linking the two table together as it normally woudl do if i select it from a 'Link From' field as this field is now empty on the new record that is creates, any one know a work around for this?Screenshot 2022-01-30 at 12.26.32

     

    BUTTON FORMULA:

    let p := (create SignedList);
    let t := TTRef;
    let s := 'Toolbox Talk Title Subject:';
    let result := dialog("THANK YOU!", "You have signed this tool box talk document and it will be added to our records.", ["OK"]);
    p.(Name := userName());
    p.(Job := "Test");
    p.(Reference := userId() + t);
    p.(Subject := s);
    p.(Date := now());
    p.(Time := now());
    p.(Location := longitude(Location));
    p.(Loc := latitude(Location));
    if result = "OK" then Status := "Signed" end

    • Terry_Prokopchuk
    • 2 yrs ago
    • Reported - view

    Screenshot 2022-01-30 at 12.28.08

    • Ninox partner
    • RoSoft_Steven.1
    • 2 yrs ago
    • Reported - view

    Hi Terry,

    To link the new created SignedList record to the current change your button formula to:

    let me := this;
    let p := (create SignedList);
    let t := TTRef;
    let s := 'Toolbox Talk Title Subject:';
    let result := dialog("THANK YOU!", "You have signed this tool box talk document and it will be added to our records.", ["OK"]);
    p.(Name := userName());
    p.(Job := "Test");
    p.(Reference := userId() + t);
    p.(Subject := s);
    p.(Date := now());
    p.(Time := now());
    p.(Location := longitude(Location));
    p.(Loc := latitude(Location));
    p.('Toolbox Talks' := me);
    if result = "OK" then Status := "Signed" end

    Steven

    • Terry_Prokopchuk
    • 2 yrs ago
    • Reported - view

    You're a gent and scholler Steven, I appreacite your help on this.

    • Terry_Prokopchuk
    • 2 yrs ago
    • Reported - view

    Hi Steven, 

     

    Not too sure if you can help, but i have the following formula as 'Trigger after update' in the 'SignedList.Reference' field, which is to stop duplicate records being created. Once they have signed I am looking to send the user an email a a reciept and record.

    However the 'Toolbox Talks'.'Toolbox Talk Title Subject:' will not add to the email text. although the 'Name' and 'Reference' fields do.

    Do you have any ideas?

     

    Thank you.

     

    let myField := Reference;
    if cnt(select SignedList where Reference = myField) > 1 then
    alert("Our records show that you have already signed this toolbox talk, no duplicate record can be created");
    delete this;
    sendEmail({
    from: "terry@tritec-ltd.com",
    to: userEmail(),
    subject: "Tritec Tool Box Talk Record: " + 'Toolbox Talks'.'Toolbox Talk Title Subject:',
    text: "Hi " + Name + " You have tried to submit your electronic signature for a toolbox talk which our records show you have already signed, if you feel that you have NOT signed this previously then please contact management, Thank you."
    })
    else
    sendEmail({
    from: "terry@tritec-ltd.com",
    to: userEmail(),
    subject: "Tritec Notification - Tool Box Talk Records",
    text: "Thank you " + Name + " for reading and submitting your " + 'Toolbox Talks'.'Toolbox Talk Title Subject:' + " toolbox talk, your unique refrence number is " + Reference
    })
    end

    • Ninox partner
    • RoSoft_Steven.1
    • 2 yrs ago
    • Reported - view

    I think you don't need to reffer to the parent table in subject:

    subject: "Tritec Tool Box Talk Record: " + 'Toolbox Talk Title Subject:',

    Steven

    • Terry_Prokopchuk
    • 2 yrs ago
    • Reported - view

    Managed to sort it, just changed the name of the field from 'Subject' to anything else and it worked?

    • Terry_Prokopchuk
    • 2 yrs ago
    • Reported - view

    Managed to sort it, just changed the name of the field from 'Subject' to anything else and it worked?

    • road documents
    • lola_manuel
    • 2 yrs ago
    • Reported - view

    5 Years of Suspension Wiped Away In One Month

    Helping Drivers

    License Restored PA
    Client “C” came to me with almost 5 years of license suspension in Pennsylvania. His driving record was a mess with old tickets from all over. Things did not sound good at first, but after our investigation, we found a PennDOT error that needed to be fixed.

    Years of experience were used to determine that the error occurred when PennDOT calculated the suspension time. At first, PennDOT was reluctant to correct the error because the calculation of suspension time and credit date seemed correct, but after a careful petition was submitted, the eligibility date was changed so “C” was able to get his license back within a month rather than 2019. Follow the link https://roaddocuments.com/shop-to-buy-real-drivers-license to get a step by step process.

Content aside

  • 2 yrs agoLast active
  • 11Replies
  • 261Views