Skip to main content
Known Participant
Mar 27, 2025 2:42 PM UTC
Solved

Record Type from a WebService. Error syncing. Type could not be inferred due to inconsistent types for field(s)

As you can see, I'm creating a new Record Type from a Webservice. I get de data properly.

But when I try to sync the data in the Record Type I get the following error: Type could not be inferred due to inconsistent types for field(s): discountPercentage

I think the format is ok. Do you why I getting the error? As you see bellow in the Expression Rule commented code, I map the fields formating the decimal fields but I don't to do so because I would map all the fields.

Any idea to solve it? Thanks!

    varuntejg243705
    Inspiring
    Mar 27, 2025 5:22 PM UTC

    Hi [mention:8cdd6119fd07485ea8670348a7dd2045:e9ed411860ed4f2ba0265705b8793d05] ,

    I think somewhere the discountPercentage  is returning a null value or an unexpected type(Type mismatch).

    If some records have discountPercentage as null or "" (empty string), Appian may infer conflicting types (Decimal vs. Text).

    I suggest you to write the below code to handle the issue..

    toDecimal(
      if(
        or(
          a!isNullOrEmpty(fv!item.discountPercentage),
          fv!item.discountPercentage = ""
        ),
        0,
        fv!item.discountPercentage
      )
    )


    Hope this will solve the issue, Or you can reply back with!!!

    6 replies

    varuntejg243705
    Inspiring
    Mar 27, 2025 5:22 PM UTC

    Hi [mention:8cdd6119fd07485ea8670348a7dd2045:e9ed411860ed4f2ba0265705b8793d05] ,

    I think somewhere the discountPercentage  is returning a null value or an unexpected type(Type mismatch).

    If some records have discountPercentage as null or "" (empty string), Appian may infer conflicting types (Decimal vs. Text).

    I suggest you to write the below code to handle the issue..

    toDecimal(
      if(
        or(
          a!isNullOrEmpty(fv!item.discountPercentage),
          fv!item.discountPercentage = ""
        ),
        0,
        fv!item.discountPercentage
      )
    )


    Hope this will solve the issue, Or you can reply back with!!!

    Known Participant
    Mar 27, 2025 9:00 PM UTC

    It works. Thanks!!