Button Scripting Help

How complex can a script be for a button? I have little to no experience in scripting and would like to get better at it. I want my button to take the information from text fields and put them into a table, clear the old entries, and be able to do this over and over. Ideally, it would act like a ‘new form’ function in microsoft access. I fill in all the values and when they’re all filled in, I would hit the save button (next button, whatever I end up calling it) and then would be able to keep doing this.

I have a table set up with the appropriate columns, but would want rows to generate with each new entry that is completed. I just have no idea where to start with the scripting for something like this. Does anyone have any good resources that could help me out? Or could someone help me out with this particular button? Thanks in advance for the help, and feel free to ask more questions about what I have already set up or if I need to clarify what I’m trying to do.

So let me double check what you are trying to do. You have a table with some columns. You have a couple of text fields, each corresponding to a column in the table. You want to be able to enter in a value into each text field, and then hit a button, and have those values be created in a new row in your table?

If this is the case, what you are looking for is the addRow function. I have mocked up a very simple example window and attached it here. You can add more text fields by adding in more variables into your script, and throwing them in the list that is being created.
table_test_window.proj (6.98 KB)

That is exactly what I’m trying to do good sir! I tried opening up your .proj file, but it says I cannot import a project from a newer version of ignition. I’m running 7.7.4. What version are you running? I thought mine was up to date. Thanks so much! I’m pretty sure your project will help a lot! (Once I get it open, haha)

Apologies, I am running 7.7.5. It can be downloaded off of our website.

I just checked for updates and sure enough, there is 7.7.5 out now! :slight_smile: I got it fixed, and your window is doing exactly what I was envisioning! I’m going to look at your scripting and see if I can modify it to my needs. I appreciate the help so much! Do you know if this could be done with a power table as well?