cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nalk
Regular Visitor

Filter on dynamics 365 for operations not applying correctly

Hello,

 

I am trying to apply several filter conditions to a dynamics 365 for operations datasource withouth any success.

The issue does not seem to be on powerapps but rather on the endpoint used by it.

For instance if I use the following formula : 

 

Filter(PurchaseOrderDirectDeliveries; InputBDR.Text in SalesOrderNumber ; Retail.Selected.StoreNumber=DefaultReceivingWarehouseId)

 

The corresponding call sent to the endpoint is :

https://europe-001.azure-apim.net/apim/dynamicsax/8a490c534884d7a3b4a3ed099fd76417/datasets/{tenant}... eq '014')&$top=100

The call seems correct as an and operator is applied between the two conditions however the result returned is as follow :

 

{
  "@odata.context":"https://dynamicsaxconnectionprovider-northeurope.db3-ase-001.p.azurewebsites.net/$metadata#datasets('{tenant}.sandbox.operations.dynamics.com')/tables('PurchaseOrderDirectDeliveries')/items","value":[
    {
      "@odata.etag":"W/\"JzE2NTU1NDA5MDEsNTYzNzIzMzkwMic=\"","ItemInternalId":"7922fd61-c24d-4668-8f5f-9441d74cc6d4","DefaultReceivingSiteId":"","DeliveryModeId":"Casiers","ShippingDateRequested":"1900-01-01T12:00:00Z","VendorOrderReference":"C'est gratos !","DocumentStatus":"PurchaseOrder","dataAreaId":"epa","TotalAmount":5.2,"CurrencyCode":"EUR","SalesOrderNumber":"CDE0039000","DeliveryTermsId":"","DeliveryAddressName":"Mauvais Payeur","OrderVendorAccountNumber":"FESYL","DlvMode":"Casiers","Name":"Mauvais Payeur","PurchaseOrderStatus":"Backorder","DefaultReceivingWarehouseId":"EPA015","PurchaseOrderNumber":"PCFS063130","PurchaseOrderName":"SYLCLAU"
    },{
      "@odata.etag":"W/\"JzE5NDk0NDEyMDMsNTYzNzIzMzkwNCc=\"","ItemInternalId":"4751d8fa-ebf4-4e8c-9f3c-25e68d6a5063","DefaultReceivingSiteId":"","DeliveryModeId":"Ccgie","ShippingDateRequested":"1900-01-01T12:00:00Z","VendorOrderReference":"","DocumentStatus":"ReceiptsList","dataAreaId":"epa","TotalAmount":3.7,"CurrencyCode":"EUR","SalesOrderNumber":"CDE0039002","DeliveryTermsId":"","DeliveryAddressName":"Jeff BAUMANN","OrderVendorAccountNumber":"FESYL","DlvMode":"Ccgie","Name":"Jeff BAUMANN","PurchaseOrderStatus":"Backorder","DefaultReceivingWarehouseId":"001","PurchaseOrderNumber":"PCFS063132","PurchaseOrderName":"SYLCLAU"
    },{
      "@odata.etag":"W/\"JzU5ODkzODYzLDU2MzcyMzM5MDUn\"","ItemInternalId":"b56e3bbd-5fe7-4904-99c7-1f8357c47f07","DefaultReceivingSiteId":"","DeliveryModeId":"BatimentB","ShippingDateRequested":"1900-01-01T12:00:00Z","VendorOrderReference":"","DocumentStatus":"PurchaseOrder","dataAreaId":"epa","TotalAmount":5.7,"CurrencyCode":"EUR","SalesOrderNumber":"CDE0039003","DeliveryTermsId":"","DeliveryAddressName":"Alexandre VINET","OrderVendorAccountNumber":"FESYL","DlvMode":"BatimentB","Name":"Alexandre VINET","PurchaseOrderStatus":"Backorder","DefaultReceivingWarehouseId":"EPA015","PurchaseOrderNumber":"PCFS063133","PurchaseOrderName":"SYLCLAU"
    },{
      "@odata.etag":"W/\"JzYxNzU5MjcwMCw1NjM3MjMzOTA2Jw==\"","ItemInternalId":"1c0229d4-d902-4225-a20f-c3bce4fb40c5","DefaultReceivingSiteId":"","DeliveryModeId":"","ShippingDateRequested":"1900-01-01T12:00:00Z","VendorOrderReference":"","DocumentStatus":"PurchaseOrder","dataAreaId":"epa","TotalAmount":5.7,"CurrencyCode":"EUR","SalesOrderNumber":"CDE0039004","DeliveryTermsId":"","DeliveryAddressName":"Alexandre VINET","OrderVendorAccountNumber":"FESYL","DlvMode":"","Name":"Alexandre VINET","PurchaseOrderStatus":"Backorder","DefaultReceivingWarehouseId":"EPA015","PurchaseOrderNumber":"PCFS063134","PurchaseOrderName":"SYLCLAU"
    },{
      "@odata.etag":"W/\"Jzg5MDExOTU1MCw1NjM3MjMzOTA3Jw==\"","ItemInternalId":"671d4594-fe6f-4422-9b07-3b2403175d7b","DefaultReceivingSiteId":"","DeliveryModeId":"BatimentA","ShippingDateRequested":"1900-01-01T12:00:00Z","VendorOrderReference":"","DocumentStatus":"PurchaseOrder","dataAreaId":"epa","TotalAmount":11.4,"CurrencyCode":"EUR","SalesOrderNumber":"CDE0039005","DeliveryTermsId":"","DeliveryAddressName":"Alexandre VINET","OrderVendorAccountNumber":"FESYL","DlvMode":"BatimentA","Name":"Alexandre VINET","PurchaseOrderStatus":"Backorder","DefaultReceivingWarehouseId":"EPA015","PurchaseOrderNumber":"PCFS063135","PurchaseOrderName":"SYLCLAU"
    },{
      "@odata.etag":"W/\"JzE1NTA2MzEyODksNTYzNzIzMzkxMSc=\"","ItemInternalId":"8d49eb45-2f5d-4f05-8c00-9f7474e75e57","DefaultReceivingSiteId":"","DeliveryModeId":"Casiers","ShippingDateRequested":"1900-01-01T12:00:00Z","VendorOrderReference":"","DocumentStatus":"ReceiptsList","dataAreaId":"epa","TotalAmount":74,"CurrencyCode":"EUR","SalesOrderNumber":"CDE0039009","DeliveryTermsId":"","DeliveryAddressName":"Jay Jay  OKOCHA","OrderVendorAccountNumber":"FESYL","DlvMode":"Casiers","Name":"Jay Jay  OKOCHA","PurchaseOrderStatus":"Backorder","DefaultReceivingWarehouseId":"001","PurchaseOrderNumber":"PCFS063139","PurchaseOrderName":"SYLCLAU"
    },{
      "@odata.etag":"W/\"Jzg4NDE0OTk0OCw1NjM3MjMzOTEyJw==\"","ItemInternalId":"6a3ce496-6bdc-439e-ab4e-0a1027634634","DefaultReceivingSiteId":"001","DeliveryModeId":"Casiers","ShippingDateRequested":"1900-01-01T12:00:00Z","VendorOrderReference":"","DocumentStatus":"ReceiptsList","dataAreaId":"epa","TotalAmount":12.85,"CurrencyCode":"EUR","SalesOrderNumber":"CDE0039009","DeliveryTermsId":"","DeliveryAddressName":"Jay Jay  OKOCHA","OrderVendorAccountNumber":"COR_Bedichou_GD1","DlvMode":"Casiers","Name":"Jay Jay  OKOCHA","PurchaseOrderStatus":"Backorder","DefaultReceivingWarehouseId":"001","PurchaseOrderNumber":"PCFS063140","PurchaseOrderName":"Cordonnerie Benichou GD1"
    }
  ]
}

The condition on SalesOrderNumber has been applied but the condition on DefaultReceivingWarehouseId is not satisfied by any of the entries returned.

I have tried several other formulas:

 

Filter(PurchaseOrderDirectDeliveries; InputBDR.Text in SalesOrderNumber && Retail.Selected.StoreNumber=DefaultReceivingWarehouseId)

or

Search(Filter(PurchaseOrderDirectDeliveries;DefaultReceivingWarehouseId=Retail.Selected.StoreNumber);InputBDR.Text;"SalesOrderNumber")

But every time the only condition taken into account is the one on SalesOrderNumber.

For information if I do a single condition on DefaultReceivingWarehouseId the condition is correctly applied.

 

Thanks you in advance for your help.

 

 

2 REPLIES 2
Community Support
Community Support

Re: Filter on dynamics 365 for operations not applying correctly

Hi nalk,

 

What is StoreNumber? Is it a column name?

 

It seems that you want to filter when the Id of StoreNumber is equal to DefaultReceivingWarehouseId, please try to configure it as Retail.Selected.StoreNumber.Id to see if it works.

 

Best regards,
Mabel Mao

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
nalk
Regular Visitor

Re: Filter on dynamics 365 for operations not applying correctly

Hi Mabel,

 

Thank you for your answer.

 

StoreNumber is indeed the name of a column thus the filter i want to implement is having the StoreNumber equal to the DefaultReceivingWarehouseId.

 

As I mentionned, both criteria when applied alone are working as expected, it is when i try to have them both applied at the same time that I encounter an issue, but to me the expression I use in the powerapps is not the issue.

 

As far as I can see, the issue comes front the endpoint that is used by powerapps.

The standard endpoint is https://{tenant}.sandbox.operations.dynamics.com/data but powerapps seems to be using https://europe-001.azure-apim.net/apim/dynamicsax as a proxy, and this proxy is only applying one of the condition.

 

Best Regards

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Attending MBAS? Claim your badge

Attending MBAS? Claim your badge

Whether you’re streaming the digital event live, or watching on-demand, claim your attendee badge to sport on your profile.

‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

‘Better Together’ Integration Forum Launch

‘Better Together’ Integration Forum Launch

We're launching a how-to forum where you can learn about how Power BI integrates with other Power Platform products.

Emergency Response & Monitoring Solution

Emergency Response & Monitoring Solution

Microsoft has created a regional government emergency response and monitoring solution that is built on Power Apps and Power BI.

Top Solution Authors
Top Kudoed Authors
Users online (5,368)