Option 1: Use Helper (Persistable) Entities for Distinct Values
Keep your WorkerDetails as NPE for display.
When your microflow fetches the WorkerDetails list:
Extract distinct Departments, Roles, Locations into small persistable helper entities (e.g., DepartmentFilter, RoleFilter, LocationFilter).
Associate them to the current user session (or a transient object).
Bind your dropdowns to these helper entities with XPath or associations.
Implement dependency:
On selecting Department → refresh Roles list (via microflow that filters roles where WorkerDetails.Department = selected).
Same for Location.
Option 2: Stay Pure NPE (All Microflow-Sourced Dropdowns)
Add NPEs: DepartmentOption
, RoleOption
, LocationOption
.
When fetching WorkerDetails, also fill these NPEs with distinct values (by Java/SQL or looping in a microflow).
Set dropdowns to use microflow data source returning distinct values.
On change of Department, trigger an on change microflow to refresh Role options.
Option 3: Hybrid — Persist WorkerDetails in a Temp Table
If your dataset isn’t huge:
Store WorkerDetails in a persistable temp table with a session key (user-specific).
Then dependent dropdowns are trivial (just XPath with distinct or constrained associations).
Add a cleanup step to delete data after session timeout/log-out.