About batch write Questions

我是 Ninox 的初学者,我的代码遇到了一些问题。我正在尝试将“1”中的信息一一写入“2”中。你能帮助我吗?提前致谢。
11 replies
-
I'm a beginner with Ninox, and I'm having some trouble with my code. I'm trying to write the information in "1" one by one into "2". Can you help me? Thanks in advance.
-
Is the data in 1 just text separated by a paragraph mark?
Is the table in 1 related to the parent table or child table in 2?
1 中的数据只是由段落标记分隔的文本吗?
1中的表与2中的父表或子表相关吗?
Hope the translation is ok. :)
-
I have attached the file. I would appreciate your help. Thank you.
-
try with this:
sorry I renamed the Table and a field , I had some difficulties with characters
-
said:
I just didn't know how to use the "item" function.Just to make things clear, what francesco wrote is a for loop command.
for [loop variable] in [array] do
end
So what you referred to as the item function is just the loop variable.
Breaking down the code:
Line 1, creates a variable, "t", and uses the 'this' command to get the record Id of the current record you are on. This allows you to access all fields in that record with just one variable. Handy if you need access to many fields, so you don't have to create a variable for each field you need access to.
Line 2, creates a variable, "s", and uses the split() command to take the text in the field '文本 (多行)' and create an array using the carriage return as the separator. In Ninox you don't need to know any special code for a carriage return as you can just hit the enter key and Ninox will know to look for that. Handy, but it can make the code, in my lowly opinion, hard to read at times.
Line 4: uses the for loop command to go through the array created in line 2 and:
create a new record in the Tabella table, line 5, and assigns it to a variable then
sets the field campo of the newly created record to equal the value of the for loop variable, "item" from line 4.
-
Based on the above questions, I have modified my code, and it can be written in. However, there is a new problem. How to merge these two code segments, thank you.
-
I did it!
Content aside
- Status Answered
- 1 yr agoFri, October 27, 2023 at 6:48 AM UTCLast active
- 11Replies
- 96Views
-
3
Following