Skip to main content

Hi,


I have a dropdown list in my form that is populated from a Smart Object (SP list) and filtered on a parent control. I only want to show unique values as it is currently returning duplicates.


Is there an easy way to do this in SmartForms?


Regards,


Ciara

Hi Ciara,


As far as I know you cannot filter this to return unique values on SmartForm level. Your Smartobject needs to return unique values from the data source. In your case, as the data source is a SharePoint list, I would say there's no "easy" way to do this as you would have to create a custom service broker (or if using Blackpearl 4.6.6, create an endpoint). Either way you'd have to write code.


Regards,


Kaua


Hi Kaua,


That's dissappointing :(  but thanks for the answer


Cheers,


Ciara


what I have done is (if your data is coming from sql for instance) just create a stored proc to return the distinct values in a list, then bind the drop down control to jsut that smart object.


I sure hope manipulating returned data with functions such as distinct values is a feature some day. This would really enable no-code users. Having to create a stored proc is pretty hindering for no-code users on a large scale.


I noticed you are filtering from a SmartObject. I am not exactly sure how the SmartObject is being consumed but an idea would be to create a SQL view of that SQL table and filter the table for unique values. Then use this SQL view to create a smartobject to be used with the dropdown. I know there are other ways to filter the dropdown. I will make a post when I remember how I have done it in the past.

 

Thanks,

Bryan Peters


Reply