Last Updated on Thursday, 08 November 2012
So this is for Microsoft Office Infopath 2007 (SharePoint 2007).
The situation is that I started creating a SharePoint List (datasheet) and when I made my form dropdown read from the list, it just put elements in the order that I entered them in the datasheet.
Googling this led me to browse MSDN for an hour before I realised all those experts were using programming solutions that seemed a bit over the top for something that should be so simple.
Hey presto, I found a cheat/workaround:
- Click on the list to see your datasheet (has a MS Access icon in the top left to remind you what you're getting yourself into)
- Go to Settings
- Select Create View
- Select Datasheet View (you could probably use a "Standard View", I just used the Datasheet one)
- Give the view a name, select what columns you want the form to have (I included the IDs for functional purposes)
- Further down the "Create View" page, there should be a Sort section, specify the column to sort by.
- Save the view by clicking the OK button.
If you haven't made a dropdown list yet There's other instructions out there on the web but I thought I'd put what I did so that when I did the above it would all work:
- Open your form in InfoPath
- Go into Design mode
- Go to "Controls" and add a Drop-down List Box to your form
- Right-click it and select "Drop-down List Box Properties"
- Under "List box entries" select Look up values from an external data source
- Next to "Data source" click on Add
- Select "Create a new connection to" and then Receive Data
- Select SharePoint library or list
- Copy the URL/web address from your browser which has the datasheet open (eg. "http://your_sharepoint_server_name/Lists/your_list_name/Allitemsg.aspx")
- Select the name of your list (I know I thought we already did this but hey ho)
- Select the fields of this list you want to use (only really need ID and Name or just the one if your dropdown values will be the same as the display labels)
- Next > Next > Finish
- infopath look up values sharepoint list sort by
- order drop-down list box without/no programming code
Latest Posts
-
Joes Revolver Map (JRM)
-
Fri 17-May-13
Hmmm... Sounds like a problem with the identifier. Was it working before and has there been a change ...
-
Fri 17-May-13
Hello Joel: Yes, I do have it published on all pages of the site. I just went back to Revolver maps to ...
-
Fri 17-May-13
Hi Bill, From the developers of RevolverMaps, "the module would need to be published on every page ...
-
Fri 17-May-13
Hi Bill, I'll investigate further as you're not the first to say this happens. In the meantime, simply ...
-
Fri 17-May-13
Its a great extension. But when I set it up I only show my presence on the 3D map and no other visitors ...
-
Fri 17-May-13


Comments
Too simple!
Thanks!
Mike
Are you refring for Infopath 2007 or 2010? In 2007 I cannot see sort option.
Thansk,
Nerfe
when I open it as a form which opens in client application, work fine, but when I wanted to open it in web page it sorted by ID. what can I do with this
I found that if you open your spreadsheet and then select view > modify this view then you can modify the default sort view there. This is the second dropdown in the right margin (top right of data) and below the "site actions" dropdown.
Joe
I am having the same issue as Erfan. I followed your instructions and even though i sort the list by a different field, in my web form dropdown it still sorts by id.
Sorry for the delay. My team decided not to use InfoPath as a solution and as such, my access to a test system has been limited. I will have a look again when I get the chance post a solution when I find one.
did you manage to find a solution to show the correct sorting in the web form?
Patrick
RSS feed for comments to this post