This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Create table within another table
#3
Hi Erwin, thanks for responding and for your help. I tried what you told me and it worked. Now, I want the same user to be the one to put the names to each subtable that will be a profile so that it can be stored and managed. I tried to use the .. to concatenate it, but it gives me a syntax error. I enclose the code to see where I am going wrong. Thank you and I will be attentive.

Code:
    Nombre_modo = grp.getvalue('32/1/21')
    encendido_clima = grp.getvalue('32/1/22')
    temperatura_clima = grp.getvalue('32/1/23')
    velocidad_clima = grp.getvalue('32/1/24')

mytable = {}
mytable...Nombre_modo = {}
mytable...Nombre_modo..encendido = encendido_clima
mytable...Nombre_modo..temperatura = temperatura_clima
mytable...Nombre_modo..velocidad = velocidad_clima
mytable.mysecondtable = {}
mytable.mysecondtable.encendido = encendido_clima
mytable.mysecondtable.temperatura = temperatura_clima
mytable.mysecondtable.velocidad = velocidad_clima
log(mytable)

resultado = storage.set('Perfiles Climas', mytable)
Reply


Messages In This Thread
RE: Create table within another table - by Carlos Padilla - 04.08.2020, 18:01

Forum Jump: