Skip to main content
Newcomer
Feb 18, 2022 4:19 PM UTC

Is it possible to convert text to numeric for an account value in a data source?

We are trying to set up a fixed matrix data source that has account values in multiple columns (mix of numeric and text).  Is it possible to convert the text value for an account to a numeric value in the data source set up?  e.g. Account text value is regular and we would like to convert it to a numeric value of 1.

4 replies

Member
Feb 18, 2022 4:21 PM UTC

I don't think the Amount column likes something coming in as Text. You might have to change that at the source.

daph99Author
Newcomer
Feb 22, 2022 4:36 PM UTC

Thanks Celvin but we were able to get it working.

Member
Feb 22, 2022 4:17 PM UTC

I will try to use IsNumeric function of vb.

In Amount column do something like:

if Not isNumeric(api.value) Then 

Return 1

Else

Return api.value

End If

This is oversimplified syntax, so I would suggest to use proper encapsulation for api.value and follow the best MSDN practices.

daph99Author
Newcomer
Feb 22, 2022 4:36 PM UTC

Thanks...  We were actually able to get it working using the substitution settings.