I have a form accesible via the web, where the user can enter a description.
This description is then stored in a document and used to update another form.
Problem is, when I pick up the description from the view, all of the text is run together.
On the field that saves the data, I set the Allow multiple values option and set the Separate Values when user enters to New Line and Blank Line and the Display Separate Values with to New Line.
On the view column, I have set the Multi-Value Separator to New Line and added @Explode (Details;@NewLine) in the column formula field.
Finally, on the field used to display the data on the second form, I have set the field to computed for display, with the exact same properties as the field on the first line (New Lien, Blank Line and New Line).
Is there anyway to preserve the new line? Can I use an agent to pick up the data and before placing it in the computed field, check for a
or Char(13)?
Any ideas or suggestions would be greatly appreciated - thanks in advance.
Subject: Text - Allow Multiple values
You’ll need to use @Implode(Fieldname;“
”) – whitespace characters are ignored on the web.
Subject: RE: Text - Allow Multiple values
Should I use it in the view column or in the field used to display the data?
Subject: RE: Text - Allow Multiple values
Both.
Subject: RE: Text - Allow Multiple values
When I use the @implode on the view column, I can see the
in the view.
However, when I use an agent to grab the data from the view and place it into a field - which also uses the @implode - it is still running together.
Why is this such a difficult thing?
Subject: RE: Text - Allow Multiple values
Is the displayed field being populated by an agent, or is computing from a field that is populated by an agent? If the agent is putting the text in, then the agent will need to add the
s.
Subject: RE: Text - Allow Multiple values
I would say the first option…the agent is assigning the value to the field.
I pick up the description in my agent:
sDescription = doc.ColumnValues(1)
then I assign the value to my field on the form:
displaydoc.Description = sDescription
Before I assign the value to the field, will I need to check each character for a Char(13) and replace it with a
?
Thanks Stan.
Subject: RE: Text - Allow Multiple values
ColumnValues(1) should come back as a Variant containing an array, so you can just use Join(doc.ColumnValues(1),“
”) to glue them into a single string.
Subject: RE: Text - Allow Multiple values
Gotcha - Thanks a lot!!!
Subject: Am I losing my mind…
Hey Stan,
I used the Join as you suggested and when I left the office yesterday all was working well.
However, when I came in this morning I am getting a Type Mismatch Error on that line:
sDescription = Join(doc.ColumnValues(1),“
”)
Any ideas?
Subject: RE: Am I losing my mind…
So not all of the data are multivalue – use IsArray to test the value before applying the Join.
Subject: RE: Am I losing my mind…
Thanks!