Fetching items failed. Possible invalid string in filter query.

  • Fetching items failed. Possible invalid string in filter query.

    Posted by Unknown Member on August 11, 2020 at 5:34 pm
    • Larry Burgess

      Member

      August 11, 2020 at 5:34 PM

      This one has me baffled.Ā  This is code that has worked flawlessly for over 18 months that is suddenly failing with the following runtime error:

      “The requested operation is invalid. Server Response: [SPO datasource name] failed: Fetching items failed. Possible invalid string in filter query.”

      I’m updating a SharePoint list from a collection.Ā  Here’s a snippet of the code:

      ForAll(
      colIndStateLicensingApproved,
      Patch(
      ‘Individual Licensing States Licensed’,
      LookUp(‘Individual Licensing States Licensed’,ID = colIndStateLicensingApproved[@ID]),
      {
      Title: Title,
      StateLicensed: StateLicensed,
      StateLicenseStatus: StateLicenseStatus,
      StateLicenseNumber: StateLicenseNumber,
      StateLicenseStatusDate: StateLicenseStatusDate,
      OriginalLicenseDate: OriginalLicenseDate,
      InterlincLicenseDate: InterlincLicenseDate,
      CEYear: CEYear,
      CEDateCompleted: CEDateCompleted,
      RenewalYear: RenewalYear,
      RenewalStatus: RenewalStatus,
      RenewalStatusDate: RenewalStatusDate,
      TerminatedInNMLS: TerminatedInNMLS,
      NMLSTerminationDate: NMLSTerminationDate,
      ProspectIUpdatedFiling: ProspectIUpdatedFiling,
      ProspectSponsored: ProspectSponsored
      }
      )
      );

      When I replaceĀ colIndStateLicensingApproved[@ID] with a hard-coded id, the code works.Ā  I thought disambiguation was supposed to handle this situation – and it has until now.

      What am I missing?

      ——————————
      Larry Burgess
      Developer
      Interlinc Mortgage Services
      Houston TX
      281-210-5669
      ——————————

    • Will Page

      Member

      August 12, 2020 at 12:51 AM

      Try replacing colIndStateLicensingApproved[@ID] with ThisRecord.ID

      ——————————
      Will Page
      Technical consultant
      Christchurch, NZ
      ——————————
      ——————————————-

    • Warren Belz

      Member

      August 12, 2020 at 1:20 AM

      Hi Larry,

      Another thought – lots of Ambiguity in there – try an As statement

      ForAll(
         colIndStateLicensingApproved As Approved,
         Patch(
            'Individual Licensing States Licensed',
            {ID:Approved.ID},
            {
               Title: Approved.Title,
               StateLicensed: Approved.StateLicensed,
               StateLicenseStatus: Approved.StateLicenseStatus,
               StateLicenseNumber: Approved.StateLicenseNumber,
               StateLicenseStatusDate: Approved.StateLicenseStatusDate,
               OriginalLicenseDate: Approved.OriginalLicenseDate,
               InterlincLicenseDate: Approved.InterlincLicenseDate,
               CEYear: Approved.CEYear,
               CEDateCompleted: Approved.CEDateCompleted,
               RenewalYear: Approved.RenewalYear,
               RenewalStatus: Approved.RenewalStatus,
               RenewalStatusDate: Approved.RenewalStatusDate,
               TerminatedInNMLS: Approved.TerminatedInNMLS,
               NMLSTerminationDate: Approved.NMLSTerminationDate,
               ProspectIUpdatedFiling: Approved.ProspectIUpdatedFiling,
               ProspectSponsored: Approved.ProspectSponsored
            }
         )
      )?

      ——————————
      Warren Belz
      Queensland Australia
      ——————————
      ——————————————-

    • Larry Burgess

      Member

      August 12, 2020 at 9:04 AM

      the “As” statement did it!Ā  It took me a couple of tries.Ā  Apparently I typed something incorrectly the first couple of times.Ā  Persistence paid off and now it’s working.Ā  I still don’t understand why it worked for 18 months then suddenly stopped.Ā  Oh well, such is life!

      ——————————
      Larry Burgess
      Developer
      Interlinc Mortgage Services
      Houston TX
      281-210-5669
      ——————————
      ——————————————-

    • Larry Burgess

      Member

      August 12, 2020 at 9:08 AM

      Will, that gives me the same error.Ā  The “As” statement that Warren suggested seems to have done it.

      ——————————
      Larry Burgess
      Developer
      Interlinc Mortgage Services
      Houston TX
      281-210-5669
      ——————————
      ——————————————-

    • Charles Palmer

      Member

      August 13, 2020 at 2:30 AM

      Hi,

      Had something similarĀ  – existing App, working for more than a year, suddenly stopped, exactly the same scenario – matching multiple collection items using ForAll.Ā 

      Ended up here on Google, and interesting that things happening at the same time.

      I am using a secondary field to hold an internal reference to match on – which happens to be a GUID type string in a text field, but which has never been an issue before.

      As suggested above things worked if I hard coded my filter values on either my internal reference or the ID fields.

      I’ve had to useĀ GUID()Ā in the ForAll/Patch/Filter steps for the filter to work.

      First(Filter(Works, GUID(job_id) = GUID(_offlineUpdateWork.job_id)))

      UpdateContext(
      {
      _patchUpdateMaintResult: ForAll(
      Ā  _offlineUpdateWorks As _offlineUpdateWork,
      Ā  Patch(
      Ā  Ā Works,
      Ā  Ā  First(Filter(Works, GUID(JobId) = GUID(_offlineUpdateWork.JobId))),
      Ā  Ā  {
      Ā  Ā  Ā  Title: _offlineUpdateWork.Title,
      Ā  Ā  Ā  Description: _offlineUpdateWork.Description,
      Ā  Ā  Ā  Rating: _offlineUpdateWork.Rating,
      Ā  Ā  Ā  Comments: _offlineUpdateWork.Comments,
      Ā  Ā  Ā  Site: _offlineUpdateWork.Site,
      Ā  Ā  Ā  Status: _offlineUpdateWork.Status,
      Ā  Ā  Ā  BeforePhoto: _offlineUpdateWork.BeforePhoto,
      Ā  Ā  Ā  AfterPhoto: _offlineUpdateWork.AfterPhoto,
      Ā  Ā  Ā  CompletedDate: _offlineUpdateWork.CompletedDate,
      Ā  Ā  Ā  CheckUser: _offlineUpdateWork.CheckUser
      Ā  Ā  Ā }
      Ā  Ā )
      Ā  )
      Ā }
      )

      (just in case it helps anyone else, as I’ve spent time trying various things / googling for ideas)

      Charles.

      ——————————
      Charles Palmer
      IT Manager
      ——————————
      ——————————————-

    • Rob Clark

      Member

      August 12, 2020 at 3:25 PM

      Apparently I cannot delete a post. I had speculation, but the problem has already been resolved I see.

    Unknown Member replied 5 years ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

The discussion ‘Fetching items failed. Possible invalid string in filter query.’ is closed to new replies.

Start of Discussion
0 of 0 replies June 2018
Now

Welcome to our new site!

Here you will find a wealth of information created for peopleĀ  that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!