Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

How to select records where the length of value is longer/shorter than X

(0) ShareShare
ReportReport
Posted on by 10

Hello all,

As specified in the subject, here is the issue i'm facing:

I would like to use the length of the field as filter critera when listing the record. Here is a specific example :

Retrieve all Contact where the length of phone number is longer/shorter than X caracters. And then see how this criteria can be add on a workflow on demand to perform massive updates on contacts.

I couldn't be able to do it either using advanced search or with FetchXML.

Can someone have an idea of how I can implement it.

I'm stuck on it and i will appreciate your feedback ASAP.

Thank you

  • Ray Profile Picture
    Ray 1,480 on at
    RE: How to select records where the length of value is longer/shorter than X

    Hi,

    For phone number is longer than X character condition, you can use like operator with (X 1) numbers of "_",  lets say X is 4, then use 5 "_" in the condition value: "%_____%".

    For shorter condition, I have no good idea so far, I think you may need loop query with certain phone number length from zero to (X - 1).

    This is the ref link for the FetchXml about

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans