rappen / FetchXMLBuilder

FetchXML Builder for XrmToolBox and Microsoft Dynamics 365 / CRM
https://fetchxmlbuilder.com/
GNU General Public License v3.0
133 stars 55 forks source link

Power Automate parameters incorrectly including single quotes for "_[schema_name]_value" lookup filter criteria #993

Closed strikeir13 closed 4 months ago

strikeir13 commented 9 months ago

With FetchXML Builder 1.2023.8.2, I'm using the Query Builder to build my Power Automate filter strings and the automatic conversion is including single quotes around lookup GUID values that prevent Power Automate from reading the GUID correctly. Here's my example:

Query Builder image: image

FetchXML:

<fetch top='50'>
  <entity name='psa_project'>
    <filter type='or'>
      <condition attribute='psa_projecttype' operator='eq' value='4550f1fe-9be3-ed11-a7c7-00224823608c' uiname='Employee Onboarding' uitype='psa_projecttype'>
        <!--Project Type = Employee Onboarding-->
      </condition>
      <condition attribute='psa_projecttype' operator='eq' value='350648dc-db24-ee11-9cbd-002248236022' uiname='Employee Offboarding' uitype='psa_projecttype'>
        <!--Project Type = Employee Offboarding-->
      </condition>
    </filter>
    <filter>
      <condition attribute='psa_projectstatus' operator='eq' value='3cc91b50-3f73-e711-80e6-3863bb35dde0' uiname='20 Active' uitype='psa_projectstatus'>
        <!--Project Status (USCC) = 20 Active-->
      </condition>
    </filter>
  </entity>
</fetch>

Generated Power Automate string:

(_psa_projecttype_value eq '4550f1fe-9be3-ed11-a7c7-00224823608c' or _psa_projecttype_value eq '350648dc-db24-ee11-9cbd-002248236022') and (_psa_projectstatus_value eq '3cc91b50-3f73-e711-80e6-3863bb35dde0')

When I copy/paste the generated Power Automate string into Power Automate and test my flow, it will not trigger correctly until I manually remove the single quotes from around the GUIDs.

Edited Power Automate string that works correctly:

(_psa_projecttype_value eq 4550f1fe-9be3-ed11-a7c7-00224823608c or _psa_projecttype_value eq 350648dc-db24-ee11-9cbd-002248236022) and (_psa_projectstatus_value eq 3cc91b50-3f73-e711-80e6-3863bb35dde0)

If any other information is needed to troubleshoot, please let me know.