How can I add a new row to Input Property of Component of Table data type inside component?
Note:
I am looking for solutions using components only.
I would recommend doing this outside of the component as you'll not be able to use a collection inside of it.
You could do it in the component with a variable, but I'd still recommend doing it outside of the component based on the press of the button inside the component.
To expand on this, I'd need to know a little more about the definition of your input property of the component. What is the formula you have for that property in the component?
@RandyHayes
Could you elaborate on your solution by using variables?
I understand your recommendation. I am still looking for a solution with component only.
I could, but I'm a little confused on your Input property definition - you mentioned "...of type table named "MyUsers".
I am not sure what you mean by that as a table does not have a name. Is that the name of the Property??
Perhaps if you have a screenshot, that might help me to understand your scenario as I'd like to provide a precise solution for you.
Okay, that is helpful...
Now, in your original post you mention: "Now, I wanted to add a new row to this table type using a button click."
Where is the table being used that you want the new row in it?
Are you ONLY adding one row ever in the component, or are you trying to do some sort of "table builder" component where a user might enter something in a textinput, then press a button, then enter more and press a button, etc.?
I am not clear on your component design or purpose, so could you expand on that? Perhaps a screenshot of what you're trying to do would help as well.
@RandyHayes by "table type" im referring to the table data type. It is referring to the same Input Property "MyUsers". I wanted to add a new row to this same table and show it in a gallery control.
Okay, I am still not understanding your purpose - and this is VERY important to providing some guidance.
I understand you have a MyUsers property and you have a Gallery in the component where you are displaying those record from that property. But, what is the intention of adding a record (and how) and very importantly, is this just one record to add, or are you trying to add more than one?
This is all important information that I need to know because components are very different than apps.
User | Count |
---|---|
260 | |
109 | |
93 | |
57 | |
41 |