I have 2 questions about a script that can create multiple records in a child table out of a long text (i.e. “Participant::Text of transcription”) in a parent table, where the records are each a single line of that transcript (line numbers should be added in a separate field too). Here is my relationship graph and the script, and then you can see my questions.
[Note: "_XLineMaking" is a global field.]
- The first issue is that I need exact number of characters, not words, as basis of the length of the line to be exported into record. The records should have a specific number of characters (i.e. the script should cut the first x number of characters and then export them to a record and so on), however, no words should be cut in half (i.e. we don't want the text in each record to have a "half-word" at the end or beginning of the line). And also if if there is a carriage at the end of the paragraph, the script should be able to keep that carriages (i.e. the last record that contains the last line of the paragraph, might have only a few characters, because there is carriage -enter- at the end of paragraph).
- For each record in the child table (where each record contains a single line of the text), there should also be a separate “line number” field. However, the “Set Field [ Lines::Line number; Lines::Line number +1 ]” does not work properly (i.e. it would not go high in 1 increments: 1, 2, 3,,... . It would only return "1" for all the records)
Any help is much appreciated.