Developer forum

Forum » PIM » Query. How to test on product name length

Query. How to test on product name length

Helene Kjærbøl
Reply

Hi PIM experts,

Is it possible to set up a query testing if the length of a string field (eg. product name) contains eg. max 150 characters?

If yes, please let me know how to do this.

BR Helene


Replies

 
Steffen Kruse Hansen Dynamicweb Employee
Steffen Kruse Hansen
Reply

Hi Helene,

We don't have anything standard, which can do this. But you should be able to achieve this by implementing a custom IndexBuilderExtender for the ProductIndexBuilder, which will calculate the length of the ProductName when the index is being built.

Then to be able to select the field in the query, I also think you need to implement a new custom ProductIndexSchemaExtender, but that should be fairly simple, if you just inherit from the original ProductIndexSchemaExtender, and just add the new field in the GetFields method.

We will create a feature request in TFS, and then we will try to come up with a solution for this, but the custom solution should provide a fix for now.

Best regards,

Steffen

 
Helene Kjærbøl
Reply

Hi Steffen,

Would it be possible for you to send me some step by step screen dumps on the proces of setting this up?

BR Helene

 

You must be logged in to post in the forum