Putting numbers generated from a generator in dataset

So im making a ticket system for my website, I have created a form that members fill out at the bottom of the form i have a check box when the member clicks that check box it generates a number for them then displays it. How do i get that generates number into my dataset and how do i add that generated number to the trigger email when they submit the form?

Any help or point in direction is much appreciated

Assuming that your form uses a submit button, then simply connect that user input to your dataset where you want this number to be saved.

If it does not save like that then simply add a setFieldValue() function for the generated number as shown here.
https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#setFieldValue

You won’t need to add the save() function afterwards as the submit button will be doing that for you.

Then to use it in your triggered email, you can simply add it into your email variables.
https://support.wix.com/en/ascend-by-wix/triggered-emails
https://support.wix.com/en/article/corvid-tutorial-sending-a-triggered-email-to-contacts
https://support.wix.com/en/article/corvid-tutorial-sending-a-triggered-email-to-members

Thank you, now in the code like when it says “NEW TITLE” is that referring to the random number that is generated or do I have to change that?