OData startswith - InfoPath Dev
in

InfoPath Dev

OData startswith

Last post 02-23-2012 05:37 PM by Hilary Stoupa. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 02-23-2012 02:35 PM

    OData startswith

    So, I really like using OData to retrieve information from SharePoint.... so much faster.

    I have been working with getting the switch "startswith" to work correctly.  I can type directly into the browser and it works fine, but when I try to embed it in infopath, I keep getting an error that the command is not formed correctly. 

    The command seems to be a bit tricky because I need to add a comma in it; for example;

    $filter=startswith(CompanyName,'a') eq true

    the comma in the (x,x) part of the command has me stumpped, any ideas on how to get this command to work correctly in IP?

    concat("https://sharepoint.company.com/departments/legal/contractmgmt/_vti_bin/listdata.svc/Contracts?$select=Title,CompanyName,Id,CompanyContact,StartDate,ContactUserID&$filter=((Approver1UserID eq '", FormUserID, "' or Approver2UserID eq '", FormUserID, "' or Approver3UserID eq '", FormUserID, "' or Approver4UserID eq '", FormUserID, "' or Approver5UserID eq '", FormUserID, "' or Approver6UserID eq '", FormUserID, "' or Approver7UserID eq '", FormUserID, "' or Approver8UserID eq '", FormUserID, "') and ApprovalPending ne 'Completed' and startswith (",ContractFilterSelect,"'",FilterLetter,"'") eq true")

    Thank you,

    -B

  • 02-23-2012 05:37 PM In reply to

    Well.... wouldn't it be:

    and startswith (",ContractFilterSelect,",'",FilterLetter,"'") eq true")

    I bolded the comma, hopefully it shows up.

    Hilary Stoupa

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