Error when trying to create filter on Profile extension resource (using other custom resources) | Community
Skip to main content
davidh2892249
Level 5
October 29, 2020
Question

Error when trying to create filter on Profile extension resource (using other custom resources)

  • October 29, 2020
  • 8 replies
  • 3262 views

Hi there,


I'm trying to build a filter definition on the profile resource extension.

 

This is so that users have a much simpler filter to use when building queries that use linked data.

 

The filter definition is like this:

 

My data model looks like this:

 

Essentially I'm trying to build a filter that returns profiles that have an order record where order date is on or after xxx

And the contains an order item record where product name comtains xxxx.

 

However, when trying to publish - I am getting the following error:

The field 'orderItems/products/productName' has not been found for the parameter 'productName_parameter' of filter 'orderedXSkuInLastXMonths' in custom resource 'profile'.

However, I tried replacing the productName_parameter with a hardcoded string and the filter publishes OK and returns the expected data.

 

Can anyone advise why this might be happening?

 

Thanks

 

David

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

8 replies

davidh2892249
Level 5
November 2, 2020
SatheeskannaK
Community Advisor
Community Advisor
November 2, 2020

Can you check on how it looks under PARAMETERS tab of filter,

 

 

Thanks, Sathees

 

Thanks, Sathees
davidh2892249
Level 5
November 2, 2020

hi @satheeskannak. Here is a screengrab. Looks ok?

 

When compared with your example, my filter is obviously using data linked to orders.
But as I said, I think the filter itself is fine as it works perfectly if I replace the parameter for productName with a hardcoded value. (whilst keeping the orderDate param)

 

SatheeskannaK
Community Advisor
Community Advisor
November 2, 2020

Hi @davidh2892249,

 

Can you try remove the filter and recreate again? and also i have created a filter and used within query activity using parameter and it works fine. Refer below screenshots.

 

 

 

 

 

 

 

 

 

Profile query with filter:

 

 

 

 

Thanks, Sathees

Thanks, Sathees
davidh2892249
Level 5
November 3, 2020
hi @satheeskannak. I have deleted and rebuilt and the error when publishing remains. As I mentioned, the parameter using a column from the orders table (orderDate) is fine. It's when using further linked data. Profile --> (1:N) Orders --> (1:N) Order Items (N:1) <-- Products. Could you try replicating using custom resources with this type of relationship?
SatheeskannaK
Community Advisor
Community Advisor
November 3, 2020
Can you clarify on cardinality defined from profile -> orders custom resource? Is that 1 cardinality simple link or (0 or 1 simple link).
Thanks, Sathees
davidh2892249
Level 5
November 3, 2020

hi @satheeskannak.

It's 1 cardinality simple link. The link is defined on the orders custom resource as below (using specific join conditions - custom customerId field on both tables)

 


There's no problem adding the param on an order table attribute. The filter works fine if just using orderDate for example.

I hope that makes sense.

Sukrity_Wadhwa
Community Manager
Community Manager
November 11, 2020

Hi @davidh2892249,

Were you able to resolve this query with the given solution? Do let us know.

Thanks!

Sukrity Wadhwa
davidh2892249
Level 5
November 11, 2020
Hi @sukrity_wadhwa, sadly not. There seems to be an issue/limitation when trying to paramaterise a field that lives on a schema more than one link beyond the profile table? As i have been mentioning, the filter works fine if you hardcode the attribute (rather than setting as a parameter). If you can have this checked with someone, that would be great.