Skip to main content
Contributor
December 20, 2022

"Enter" parameter

  • December 20, 2022
  • 6 replies
  • 0 views

Hi Team,

 

I'm wondering if there's a parameter that can be used in OS for a new line?

I mean there's already a |SPACE|, which works perfectly, but I would need such parameter for new line (like \n in VB.NET), any ideas?

 

Thank you!

6 replies

OneStream Employee
December 20, 2022

Are you wanting to produce a multi-line text string?
Have you tried System.Environment.NewLine ? ( this would be the line separator as defined on the computer type , as opposed to a fixed constant)
( The legacy VB constant vbCrLf will also put a newline into a string, but that was more hard-fixed to a Windows mindset of CRLF, so should not be a problem on Windows , but then... )

KamilaAuthor
Contributor
December 20, 2022

Hi Chris,

Thanks for your reply. Actually I wanted to use it in Cube View to create a 2 lines with text in one cell.

Unfortunately I can use only parameters there, as System.Environment.NewLine seems not to be working.

Thank you!

 

OneStream Employee
December 20, 2022

The System.Environment.NewLine is for business rules of course, but you didn't say that this was something that you needed for CubeViews.
Where are you attempting to put multi-line text? Is it in a column header, row header, or in the data cells as part of a V#Annotation (cell detail) view?   The Data Explorer view will not show multi-line text reliably on row/column headers (may have cropping issues) : you can use an XFBR expression to run an XFBR rule to return a multi-line string; just no guarantee how it will look in the Data Explorer view.  This is how mine looks:
Row definition:  A#16000:Name(XFBR(CubeViewLists,GetMultiLineText))

ChrisLoran_0-1671547518481.png

 

Cell detail text (such as V#Anotation view) Also won't display multi-line text in the Data Explorer view.
Even if you have a DynamicCalc that returns a successful multi-line string, the CubeView will show the text on one line.

ChrisLoran_1-1671547811998.pngChrisLoran_2-1671547836909.png


For Report View output, the same limitation applies I believe ( it still displays multi-line text on a single line )

ChrisLoran_3-1671547916907.png

 

KamilaAuthor
Contributor
December 21, 2022

I'm trying to put multi-line in column header. I really like your solution with XFBR rule, can I see how you built it - (XFBR(CubeViewLists,GetMultiLineText)) ?

OneStream Employee
December 21, 2022

This is the source code used in my XFBR rule example:

If args.FunctionName.XFEqualsIgnoreCase("GetMultiLineText") Then
  '-- XFBR(CubeViewLists,GetMultiLineText)
  Dim str As String = "Line1" & System.Environment.NewLine & "Line2"
  Return str
End If

KamilaAuthor
Contributor
December 22, 2022

Thank you for your time Chris, much appreciated!