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