+ Start a Discussion

Unique Values

I am creating a dependent picklist in visual workflow using dynamic choice elements. The data source for picklists is a custom object field. The dependent values are stored as fields and the data is denormalized to represent the dependencies between the fields. Based on the dependencies and table structure, when I fetch values for the first dependent element, I am getting duplicate values as it is in the database. Any way to fetch only the unique values using visual workflow


No, there is no "Distinct" option when quering a salesforce table. May be you can add another field which can be used in a filter?

Jeff BloomerJeff Bloomer

I have to admit, I cheated.  I added a field into my object that is only visible to administrators that is a checkbox.  My specific example was for Industry.  I placed a check in the first record each time the choice changes.  I then use this field as a filter in my dynamic choice so that I only get one unique value for each.  Until Salesforce makes it available within flows, this seems to be the only fast workaround for now.