Data needs to be stored in line by line

in a paragraph field i will provide input as 

test1

test2

test3

How this data will be stored in db ,is it will be in line by line as separate string or as a single string

  Discussion posts and replies are publicly visible

Parents Reply
  • Here's a similar but alternative approach I just typed up, for what it's worth:

    a!localVariables(
      local!emailParagraphText,
      
      local!individualEmails: if(
        a!isNotNullOrEmpty(local!emailParagraphText),
        a!forEach(
          split(local!emailParagraphText, char(10)),
          if(a!isNotNullOrEmpty(fv!item), fv!item, {})
        ),
        {}
      ),
      
      local!invalidEmails: a!flatten(a!forEach(
        local!individualEmails,
        if(
          validateemailaddress(fv!item),
          {},
          fv!item
        )
      )),
      
      
      a!paragraphField(
        label: "emails",
        value: local!emailParagraphText,
        saveInto: {
          a!save(
            local!emailParagraphText,
            clean(save!value)
          )
        },
        validations: {
          if(
            a!isNotNullOrEmpty(local!invalidEmails),
            "Invalid emails entered: " & joinarray(local!invalidEmails, ", "),
            {}
          )
        }
      )
    )

Children