Multiple dropdowns with duplicate values

Hi All.
I'm trying to create an editable grid with 4 dropdown component. The values of the dropdown are populated by query rules. Based on the value of the dropdown selected in the first dropdown, the values in the second dropdown should be populated. The issue I'm facing here is if there are any duplicate values in 1st dropdown, its throwing an error. But if you combine together both dropdown1 and dropdown2 they are unique.
Ex: Dropdown1 dropdown 2
Fruits Apple
Fruits Oranges.
So, when I try to retrieve these values from DB and display in editable grid, it is throwing an error regarding duplicate values in dropdown1. But this error is not consistent as it is displaying without any issues sometimes.
Any suggestions

OriginalPostID-245812

  Discussion posts and replies are publicly visible