You can not do this with non persistable objects. You should create persistable objects and fill those with REST calls. You can then use the XPath datasource with constrained by function.
Regards,
Ronald
the issue here is that the datasource microflow of the district runs at opening of the page, at that moment the state is not yet selected and thus the list of districts is empty.
solution
on-change of the State selection, run a microflow which refreshes the context object, which will retrigger the datasource microflow of the district.
Advice: add a decision on the datasource microflow of the state: if state is empty call rest service for state, else don’t. So the when you select a state, the state datasource will not run again unnecessary.
The same can be done on the district datasource, when state is empty, don’t call district rest.