Sort data from SQL Server Smartobject in Infopath

  • 9 October 2013
  • 3 replies
  • 0 views

Badge +5

I have a form that pulls data from 3 different data tables in SQL Server. I would like for the data in the dropdown field to be sorted, since its pretty lengthy. Any way to do this without code?


BTW, this is BP 1420 and Infopath 2007.


Thanks


Dave


3 replies

Badge +6

How about writing a stored procedure that has an ORDER BY clause in it. Then create a smartobject for that stored procedure and use it.

Badge +2

Hi,


 


I'd recommend to create a separate view in SQL and then create a SmartObject out of the view. And in the view you can create any sorting order as you 


This will definitely help if your sorting order is not dynamic and you are not going to edit the tables.


 


Best regards,


Konstantin

Badge +1

If you don't want to get into the SQL, you can "hack" the InfoPath form and simply add an XSL:Sort node to your dropdown.

Reply