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
Discussion posts and replies are publicly visible
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))
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
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.
so any suggestion what I can use instead of repeat ?
Run a loop in invoiceToOrder CDT's value parameter and construct your data there.
Hi rajthakorrr ,just try with the below code repeat(count(a!flatten(pv!ordersId)),cast(tointeger(1),pv!invoice.id))
hey Kiran Thank you ! it works