How to post code in the community.

OSAdmin
Valued Contributor

Among the many tools that ONECommunity has is the ability to post your code with some built in formatting.   

When your writing a post if you select on the icon in yellow  </>  

OSAdmin_1-1634148526119.png

A window will pop up that will allow you to post your code.   You should use the HTML/XML

OSAdmin_2-1634148629805.png

When posting code all code should be commented properly. 

 

 

'Example Code

Dim strLine As String = args.Line
Dim sections As List(Of String) = Stringhelper.SplitString(strline, "-", vbNullString)
Dim stracct As String = sections(0)
				
Return stracct
				

 

2 REPLIES 2

PhilB
New Contributor II

Will you be able to add the ability to format code as VB.NET? The HTML/XML works ok, but it doesn't have the same color coding that exists in OneStream/VB.NET

'I am a comment
args.ConfirmationRuleArgs.DisplayValue = api.Data.GetDataCell("A#Headcount").cellAmount
If args.ConfirmationRuleArgs.DisplayValue > 0 Then
     Return True

 

However, for OneStream code it would be ideal to have formatting that matches OneStream. So, something like this:

'I am a comment
args.ConfirmationRuleArgs.DisplayValue = api.Data.GetDataCell("A#Headcount").cellAmount
If args.ConfirmationRuleArgs.DisplayValue > 0 Then
    Return True

Phil Brosnan
pbrosnan@finit.com | finit.com

OSAdmin
Valued Contributor

We will discuss with Khoros to see what is possible.   However coping and pasting the code from here into OneStream will color code it again.