Skip to main content
Inspiring
Oct 8, 2021 8:14 AM UTC
Question

about the datatype transfer not correct

load(
  local!data:{
    rule!KONE_Development_trail_flatten("song","wang")
  },

  local!updateColumn: tointeger(
    updatearray(
      local!data.user,
      a!forEach(
        items:rule!KONE_Development_CSE_TENDER_PHASES_Rule(),
        expression:fv!item.id
      ),
      a!forEach(
        items:rule!KONE_Development_CSE_TENDER_PHASES_Rule(),
        expression:fv!item.id
      ),
    )
  ),

  updatecdt(
    local!data,
    {
      user:{(local!updateColumn)}
    }
  )
  )

Expression evaluation error at function 'updatearray' [line 7]: The indices are not of the expected type. Type of indices: List of Variant. Type expected: List of Number (Integer)

AnyOne can correct?

    2 replies

    danny.verb
    Employee
    Oct 8, 2021 11:24 AM UTC

    Wrap 'fv!item.id' in 'tointeger()' to cast the data

    Inspiring
    Oct 8, 2021 12:46 PM UTC

    Sir,how would you do if let you up update multiple rows in the database by interface expression or process model way? I am really ardent want to figure it out, which stun me for couple of days.