Skip to main content
rajt5823
April 11, 2024
Solved

Error while storing Multiple Data into CDT

  • April 11, 2024
  • 7 replies
  • 0 views

An error occurred while evaluating expression: =repeat(count(pv!ordersId), pv!invoice.id) (Expression evaluation error at function 'repeat': Cannot repeat list type) (Data Inputs)

so I having many to many relationship names as invoice to ordersId so while mapping data into CDT using repeat function I am getting this above error I want to store 2,1 orderIds  within same invoice 

    Best answer by niranjanreddym9323

    Hi [mention:812eb21e01c74d41b8a3e88c1e0aa225:e9ed411860ed4f2ba0265705b8793d05] ,

    just try with the below code 

    repeat(count(a!flatten(pv!ordersId)),cast(tointeger(1),pv!invoice.id))

    7 replies

    harshitb6843
    April 11, 2024

    The code looks right to me. Let's clean this up a little. Try and see if this helps - 

    =repeat(count(a!flatten(pv!ordersId)), tointeger(pv!invoice.id))

    rajt5823
    rajt5823Author
    April 11, 2024

    An error occurred while evaluating expression: =repeat(count(a!flatten(pv!ordersId)), tointeger(pv!invoice.id)) (Expression evaluation error at function 'repeat': Cannot repeat list type) (Data Inputs)  

    getting this error 

    harshitb6843
    April 11, 2024

    Oh. I get it. So the problem is that your pv!invoice is of multiple type and hence pv!invoice.id gives you a list. 

    Repeat cannot work with list.