Hello Neha,
I checked your OML you are doing something wrong
instead of using Boolean variable you will save the country id there in the local one and pass that as variable to country dropdown

In the aggregate write this
If(Countryid<>NullIdentifier(),State.CountryId=Countryid,True)
for reference I have Attached OML and URL
https://akshayproject.outsystemscloud.com/FetchingDataOnDemandExercise/EmployeeDetail?_ts=637813461045778051
may be this will helps you,
NOTE: make sure while bootstrapping one state name not belongs to two country
i.e. Country: INDIA state: Maharashtra , Country: Brazil state : Maharashtra
Thanks and Regards,
Akshay Deshpande