Inserting items in the list is not working properly

The list is not taking more than one item upon insertion…

You should not ever set the loop variable (i) to a value. That is reserved for counting the index of the loop (1, 2, 3, 4, …).

I think the block you’re wanting to use is this:

That way, j will hold the value of each row (you would use the list of values in PatientD block as your list).

If you want to stick with the count with block, then set a different variable to the get row object for the row id. But make sure the row id is the variable i (the loop counter) and not just the text string “i” as you now have it. Those are two different things.

What does your spreadsheet look like? Are you needing to compare two different column values? If you could say in a sentence what you’re trying to find with your if block, what would it be?