Help constructing SortTable syntax - InfoPath Dev
in

InfoPath Dev

Help constructing SortTable syntax

Last post 02-02-2011 09:28 AM by Hilary Stoupa. 10 replies.
Page 1 of 1 (11 items)
Sort Posts: Previous Next
  • 01-27-2011 06:10 AM

    Help constructing SortTable syntax

    I need help fomulating the SortTable command. 

    It is a secondary data source.

    Here is the XPATH of the field I want to sort on. 

    /dfs:myFields/dfs:dataFields/dfs:User_Information_List/@Name

     

     

  • 01-27-2011 07:15 AM In reply to

    Re: Help constructing SortTable syntax

    I'll assume that dfs:User_Information_List is the repeating field, but let me know if this is not correct.

    SortTable /row=/dfs:myFields/dfs:dataFields/dfs:User_Information_List /compare=@Name /order=DESC

    Can you try that?

    Thanks.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 01-27-2011 11:41 AM In reply to

    Re: Help constructing SortTable syntax

    Ernesto,

    Thanks, 

    The code did not error out in my form.  (good news).  I won't know if it really worked until I publish it to SP and run it from the server since that is the condition in with the User Information List does not sort when loaded as a data source.  I will let you know.

     Marlene

  • 02-01-2011 09:08 AM In reply to

    Re: Help constructing SortTable syntax

    I am getting the following error in qrules:  An error has occurred executing the rule. Failed to select the table to sort.

    I have included a sample form 

     

  • 02-01-2011 09:30 AM In reply to

    Re: Help constructing SortTable syntax

    Because you are sorting the data in a secondary data source, you'll need to add one more parameter. The dsname parameter is optional and only needs to be declared if it is not the Main DOM. So your command becomes:

    SortTable /dsname=User Information List /row=/dfs:myFields/dfs:dataFields/dfs:User_Information_List /compare=@Name /order=DESC

    Can you please try adding that parameter? Thanks!

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 02-01-2011 09:51 AM In reply to

    Re: Help constructing SortTable syntax

    That worked.  Other than I need to change the order to ASC.

     This is a browser form.  I'd love to be able to find a way to filter this dropdown list to only those whose Content_type = "Person" and Name contains "*HS"

    I can do this using a caml query and the U2U tool.  Sample .caml file appended. (remove the .txt). 

    Can I copy only some items from this data source to another?  I don't see that copytable has that option.

     Most of the people using this from are "techies" so it is not critical, however, I would like to be able to limit the dropdown list.

     any suggestions?

  • 02-01-2011 10:00 AM In reply to

    Re: Help constructing SortTable syntax

     You can filter a SharePoint list on the server using qRules (read more here). CopyTable cannot filter when copying, unfortunately.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 02-01-2011 11:52 AM In reply to

    Re: Help constructing SortTable syntax

    I'm getting and error when I go to the Owssvr.dll

    http://hscsbidev2:1105/_vti_bin/owssvr.dll

     "cannot complete this action"

    Can I use FilterOwssvr against the Secondary data source after the sorttable? 

     

     

     

  • 02-01-2011 11:56 AM In reply to

    Re: Help constructing SortTable syntax

    Hi -- that link is incomplete -- you need to have the List GUID, and a few other parameters. The URL should look something like:

    http://server/_vti_bin/owssvr.dll?Cmd=Display&List={1CC3F2DD-4251-4A98-9BC9-E584496C0727}&XMLDATA=TRUE

    With your server URL and your List GUID. Please refer to page 2, item C, bullet 2 in the document Ernesto referred you to for additional info. Item B explains how to get the correct GUID.

    Hilary Stoupa

  • 02-02-2011 04:27 AM In reply to

    Re: Help constructing SortTable syntax

    I was getting the error with the full command line, I was trying to test the dll alone.  It seems it was a space after List= that was the issue.  Syntax is kinda a pain.  Works now.

  • 02-02-2011 09:28 AM In reply to

    Re: Help constructing SortTable syntax

    Ah, sorry! I didn't see the space when I pasted my sample in. I've fixed it so that it is correct now.

    Hilary Stoupa

Page 1 of 1 (11 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.