web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Calculated Field - looking for certain text

(0) ShareShare
ReportReport
Posted on by 30

I am building a CASE formula and want to base it off of if there is certain text in a field, specifically the letters "MG" that will be next to each other. I have tried contains and cannot figure it out. 

Thank you for your help! 

Categories:
I have the same question (0)
  • Suggested answer
    David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    14,095 Most Valuable Professional on at

    Hi Debra

    I am assuming this is for a Report Writer calculated field.

    You can use the User Defined function RW_Pos() in the system series

    function returns integer OUT_pos;
    in string IN_target; { The string you want to search in }
    in string IN_search; { The string you want to search for }
    in integer IN_start; { The position at which the search will start in the target string }

    If it returns > 0 then the letters you are searching for exist in the string.

    Hope this helps

    David

  • Suggested answer
    Almas Mahfooz Profile Picture
    11,009 User Group Leader on at

    Hi DebraH,

    It sounds more complicated to be carried out in report writer (if you are talking about report writer).

    In my opinion it will take you to create multiple calculated fields and even not sure if it will work.

  • David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    14,095 Most Valuable Professional on at

    Hi Almas

    It will require multiple calculated fields, but nested conditional calculated fields can create the equivalent of a case statement.

    It would probably help if Debra explained the end result.

    Also with GP Power Tools you can create custom RW functions that can look at any data or perform any calculation.

    Regards

    David

  • Suggested answer
    Almas Mahfooz Profile Picture
    11,009 User Group Leader on at

    Hi David,

    Yeah that's what I was thinking , we don't know until Debra explained the complete condition and that's why I said it would be a complicated one for report writer level.

    RW Functions either from GP Power Tools or Dexterity will be more flexible and could cover more cases easily,

  • DebraH Profile Picture
    30 on at

    Hi David, Almas

    This was a calc field for a Smartlist. I figured it out last night!

    I was able to use "substring" : WHEN SUBSTRING ({Account Transactions:Description},10,1)="M"  .

    Thank ya'll for your help!!!

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 611 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 529 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 285 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans