The OneStream Community is temporarily frozen until June 29th due to the ongoing maintenance. Please read the blog post here to learn more.
Forum Discussion
Irina
11 months agoContributor
Text field of Entity dimension in cube view
Dear all,
Could you please advise how to show content of certain Text field of Entity dimension in cube view?
- 11 months ago
If your using text2 then you would need to change it. It is, you will just need logic to clean the string. Something like this should work.
Dim textVal As String = api.Entity.Text(EntityID, 1, False, False) Dim taxRateStr As String = "" If Not String.IsNullOrEmpty(textVal) Then Dim startIndex As Integer = textVal.IndexOf("CIT=") Dim endIndex As Integer = textVal.IndexOf(",", startIndex) If startIndex >= 0 AndAlso endIndex > startIndex Then taxRateStr = textVal.Substring(startIndex + 4, endIndex - (startIndex + 4)) End If End If Dim TaxRate As Decimal = taxRateStr.XFConvertToDecimal() / 100D
Irina
11 months agoContributor
Dear Ben,
Thank you! Am I right, that if tax rate is in Text2 field of Entity dimension, I need to change 1 to 2 in the nest string: api.Entity.Text(EntityID,2, False, False)?
I have another issue with this text field. It contains not only tax rate, but also text like this: CIT=15, VAT=0, so I need to take only number after text "CIT=" and before ",". In Excel I use function like this: SUBSTITUTE(LEFT(cell with Text2,FIND(",",cell with Text2)-1),"CIT=","")/100. Is it possible to extract tax rate in OneStream from text field too?
BenEppel
11 months agoContributor
If your using text2 then you would need to change it. It is, you will just need logic to clean the string. Something like this should work.
Dim textVal As String = api.Entity.Text(EntityID, 1, False, False)
Dim taxRateStr As String = ""
If Not String.IsNullOrEmpty(textVal) Then
Dim startIndex As Integer = textVal.IndexOf("CIT=")
Dim endIndex As Integer = textVal.IndexOf(",", startIndex)
If startIndex >= 0 AndAlso endIndex > startIndex Then
taxRateStr = textVal.Substring(startIndex + 4, endIndex - (startIndex + 4))
End If
End If
Dim TaxRate As Decimal = taxRateStr.XFConvertToDecimal() / 100D
- Irina10 months agoContributor
Dear Ben,
Thanks a lot for solution!
Related Content
- 2 years ago
- 1 year ago