Welcome to the Jazz Community Forum
HTTP based filtered value providers, allowing only valid parent/child choices and clearing on modification

RTC 5.0.2 iFix006
Using https://sudhakarf.wordpress.com/2013/07/19/http-filtered-value-set-providers-and-dependent-enumerations/
I have successfully implement 3 fields that I am driving with values externally via HTTP filtered value sets.
I have also set up that those fields has a dependency on the previous one to create a parent child relationship, this works fine
Yet I am seeing (maybe somie basic RTC that I am missing) that the Workitem will allow for a child field to be selected previous to its parents, and also even if not in the parents list,....
so it works if I select 1st field... then 2nd and 3rd....only
also if I change the 1st field to a different value the 2nd and 3rd values seem to perist,,,,
Using https://sudhakarf.wordpress.com/2013/07/19/http-filtered-value-set-providers-and-dependent-enumerations/
I have successfully implement 3 fields that I am driving with values externally via HTTP filtered value sets.
I have also set up that those fields has a dependency on the previous one to create a parent child relationship, this works fine
Yet I am seeing (maybe somie basic RTC that I am missing) that the Workitem will allow for a child field to be selected previous to its parents, and also even if not in the parents list,....
so it works if I select 1st field... then 2nd and 3rd....only
also if I change the 1st field to a different value the 2nd and 3rd values seem to perist,,,,
One answer

There is no notion of parent/child attributes in RTC. All attributes are completely independent of each other.
What you can do as Donald hints, is creating validators for a filed that validate its content and prevent saving if the validation fails. The attributes would have a dependency to their "parent fields" to be triggered if the values change. I don't think validators can access the http filtered value provider to be able to load data. You can check https://jorgediazblog.wordpress.com/2012/06/27/work-item-customization-httpconector-and-oauth-in-rtc-4-0-for-oslc/ if you can use the same scripting in a validator based on JavaScript, but I don't have high hopes.
You could try to do the validators in Java as described in https://rsjazz.wordpress.com/2013/06/26/attribute-customization-java-based-value-providers-conditions-and-validators/. Maybe you have more capabilities there.
Comments
Donald Nong
Jun 22 '15, 3:00 a.m.Have you implemented any validation mechanism? If you follow that blog exactly, the attributes are of "small string" type and I doubt that RTC will by default enforce any validation on them.