04-13-2023 03:01 PM
Hello,
I am seeking advice on how I should go about setting up a table to be used as an indicator for previous values entered into a form. I tried looking at other questions on forums but none are really asking what I am looking for. Currently I have a form that asks for three things, a two digit carrier number, a string, and another string. It's in a cluster so I assume I will have to convert it to an array of the same data type to be able to send it to a table.
What I don't get is how to set the table up to repeat only once the submit button has been pressed, storing the value on the next row each time the button is pressed. I have never used tables before so any advice would help. I went over the tutorials, they didn't help much, and I have looked in the manual.
Thank you!
Solved! Go to Solution.
04-13-2023 03:03 PM
Here are my SubVis (part 1)
04-13-2023 03:04 PM
Here are my SubVIS (part 2)
I figured by seeing how the code runs it would help understand what i am asking.
04-13-2023 04:54 PM
Not able to view your code because of multiple attachments, based on my understanding with your information, you want to update table repeatedly (holding previously updated values) in this case use table properties to (Read/write options available)
Read the existing values and append current iteration value and write back to table.
04-14-2023 07:46 AM
Yes! I have a form made currently, so each time they 'submit' the form it should add a new row to the table with the information they submitted, then begin again on the new row.
The table would be nothing more than an indicator. I tried using a the Build Table function but couldn't wrap my mind around it. My data is in a cluster so I assumed I would need to change it to an Array.
Could this be done with a while loop? or does it have to be a for loop?
04-14-2023 09:33 AM - edited 04-14-2023 09:34 AM
Remember a Table is nothing more than a String Array with a fancy front panel indicator.
All of the Array functions operate on a Table exactly the same.
04-14-2023 11:55 AM
Hello Paintman,
Update this piece of code in your application
04-14-2023 01:49 PM
I am testing this out, for table controls and data form when they say "[abc]" are those constants made from the table and form? I tried using the cluster of my data to sync with the first property node in the second half but it says my data types are different. Is there a way to change what data types the node is looking for?
04-14-2023 03:21 PM
@paintman wrote:
I am testing this out, for table controls and data form when they say "[abc]" are those constants made from the table and form? I tried using the cluster of my data to sync with the first property node in the second half but it says my data types are different. Is there a way to change what data types the node is looking for?
Not able to understand your Problem, For Changing Data type use Variant to Data, if your Input is Variant.
Already you have an Array after conversion same can be used for Building Table Array.
Note Table is a 2D Array of Strings.
If you are still having is data type conversion, be specific on what is your Cluster Data and Expected Datatype?
04-14-2023 08:55 PM - edited 04-14-2023 09:31 PM
Hi Paintman,
if you have your data in the cluster, you probably don't need to convert cluster to array. You can use "unbundle" or "unbundle" by name to extract data out of a cluster as shown below in my code below.
Try to update your code to this below. Shift registers are very good; they allow you to update your table while saving previous data.
Below is how maybe you should modify your code. I hope it gives you an idea.
Front panel