Update Database By using PageList Property

I have an Requirement To update my Database by using PageList P

roperty .Please Help me Out

@chitraR16796988 The operation is being performed on 2 different types. Please try in below way :

.Stock - @toInt(Primary.SelectedPets(Param.IndexVal).Quantity

As per the attached reference image, the index value for the pagelist is also missing.

@chitraR16796988

I hope the Stock and Quantity are Integer data types.

change to Primary.SelectedPets().Quantity