Skip to main content
Answer

Data model filter on length of attribute value

  • July 14, 2025
  • 3 replies
  • 48 views

Forum|alt.badge.img

Hi all,
I am building a solution model on top of  a domain model we already have in place for a project.
The domain model contains all the instances we have in the project, but this consumer is only interested in a subset and would like some filters in place to ensure that they are only getting the subset of interest. One of the requirements is that a certain property is according to their project standards and has a minimum length for a property. I see that there is a Range filter to check if a numeric property’s value is within a specified range, but is there any way I can add functionality to get the values length for this property?

Best answer by Anders Albert

I have checked now, and unfortunately we do not have such as filter. The closes we have is a prefix-filter, but that does not sound like what you need.

 

I guess a workaround is to introduce a new integer variable tagLength, store the length of the tag in it, and use a range filter. However, that puts requirements on you when you ingest data to ensure consistency. 

3 replies

Anders  Albert
Seasoned Practitioner
Forum|alt.badge.img
  • Seasoned Practitioner
  • July 14, 2025

Can you give an example here? I do not understand why you need to get a length within a filter?


Forum|alt.badge.img
  • Author
  • Committed
  • July 14, 2025

Let’s call this attribute ‘ObjectName’ (alphanumeric attribute). According to the consumer’s standards, only instances with an ‘ObjectName’ of length 7 characters or greater are valid objects. However our domain model also contains instances with ‘ObjectName’ of length shorter than 7 that are work in progress. The idea was for the solutionmodel that is mapping to the domain model to have a rawFilter that checks that the length of ‘ObjectName’ is 7 or greater to ensure that the instances they are getting match their requirements for a valid object.


Anders  Albert
Seasoned Practitioner
Forum|alt.badge.img
  • Seasoned Practitioner
  • Answer
  • July 15, 2025

I have checked now, and unfortunately we do not have such as filter. The closes we have is a prefix-filter, but that does not sound like what you need.

 

I guess a workaround is to introduce a new integer variable tagLength, store the length of the tag in it, and use a range filter. However, that puts requirements on you when you ingest data to ensure consistency.