Forum Discussion

daph99's avatar
daph99
New Contributor
4 years ago

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.

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

    • daph99's avatar
      daph99
      New Contributor

      Thanks Celvin but we were able to get it working.

  • 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.

    • daph99's avatar
      daph99
      New Contributor

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