Set property dynamically
If I have table of 60 fields is there a way to add values to columns dynamically ?
Fields are like this Field1, Field2, Field3...Field60 and I am reading data from flat files. I tried below code but it didn’t work
For i=2:1:$LENGTH(line) {
set SourceTable.Field_i = $PIECE(line, "|", i)
https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...
Hi @Dmitry Maslennikov
This suggestion worked thanks, one I am looping over 60 columns and all is working fine. One thing is breaking sometimes data is single codes ' in the text and such records are not being saved. Any suggestion how to handle this?
set FieldName = FieldName_",Field"_i
set FieldVaue = FieldVaue_"','"_$Piece(pInput,"|",i)}
use $translate