Array to records in a table
I have this array:
[{\"Selecciona tu piso\":\"GR. XALET 121\",\"Quan\":\"11-11-2022\",\"Hora\":\"15:15\"},{\"Selecciona tu piso\":\"ST AV FENER\",\"Quan\":\"15-11-2022\",\"Hora\":\"20:40\"}]
Also, I have a table with fields:
- place
- date
- time
I need to push a button and create a record in the table for each record of the array, putting on each field as follows:
record 1:
- place: GR. XALET 121
- date: 11-11-2022
- time: 15:15
record 2:
- place: ST AV FENER
- date: 15-11-2022
- time: 20:40
Everything that comes before and after the values to extract, are always the same.
How would you do that script in the button?
2 replies
-
Is there anyway to remove the "\"? When I try copying the bit of data Ninox gets all confused with the "\". There is no way that I can see, but I'm not the smartest, that you can use the sample data without Ninox freaking out. I can't use the replace function because you can't use the data as is. You can't put the data into a variable.
Once you clean it up you can do a lot of things with it. For example:
let array1 := [{ 'Selecciona tu piso': "GR. XALET 121", Quan: "11-11-2022", Hora: "15:15" }, { 'Selecciona tu piso': "ST AV FENER", Quan: "15-11-2022", Hora: "20:40" }]; for loop1 in array1 do loop1.Quan end
This gets all of the data in from the Quan part of the array.
["11-11-2022","15-11-2022"]
Content aside
- 2 yrs agoLast active
- 2Replies
- 238Views
-
3
Following