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, ...
Answered

Bring a specific character of a string of characters in Electronic Reporting

(0) ShareShare
ReportReport
Posted on by 46

Hi everyone
I need to do something in Electronic Reporting using formulas but I need some help because I'm having a hard time doing this.
I am trying to recover a character using a specific character as a parameter ina character string.
Ok, I will try to demonstrate it.
In a a specific text field of D365FO I have the information "654321-0".
In the model mapping I only needs to bring the characters that are after the character "-".
Is it possible to do that in using formula in Electronic Reporting?
Thanks to advance

I have the same question (0)
  • Suggested answer
    huijij Profile Picture
    19,811 on at

    Hi Eric_Santos,

    Please refer to the RIGHT ER function which returns a String value that presents the specified number of characters from the end of the specified string:

    docs.microsoft.com/.../er-functions-text-right

  • Suggested answer
    Alireza Eshaghzadeh Profile Picture
    14,672 Super User 2025 Season 2 on at

    Hi Eric,

    It is possible.

    If your information is fixed with the provided format (i.e. 654321-0). You can try with Right formula - RIGHT(parameter,1). Then the result will be " 0 " .

    Or if the "-" as 7 character in your field, you can use MID formula. MID(parameter,8,5)

    Example: 654321-912

    Result: 912

  • Eric_Santos Profile Picture
    46 on at

    Hi Judy.

    Thanks for your answer.

    I need to apologize because I think that I didn't explain the whole scenario.

    The information on this field is not standardized. This is a governmental data and depends of the vendor location. Depending of the city where it is located this number can change of the format. In some cases this number will have a check digit like the format that I passed before (654321-0). In other cases this number wont have this check digit (654321).

    So, in ER, in a specific field of the reporting I need to fill only the check digit if it exists. If don't this field needs to be leave in blank.

    What I need is a way that attends the both cases with and without the check digit. That is the reason that I would like to use the character "-" as a parameter. Because if the number filled on the field has the check digit it must have the character "-". Otherwise it wont have this character.

    I hope I could to explain better now.

  • Eric_Santos Profile Picture
    46 on at

    Hello, Alireza.

    Thanks for your reply. I need to apologize with you to. As I said to Judy above I didn't explain my scenario correctly.

    The information on this field is not standardized. This is a governmental data and depends of the vendor location. Depending of the city where it is located this number can change of the format. In some cases this number will have a check digit like the format that I passed before (654321-0). In other cases this number wont have this check digit (654321).

    So, in ER, in a specific field of the reporting I need to fill only the check digit if it exists. If don't this field needs to be leave in blank.

    What I need is a way that attends the both cases with and without the check digit.

    That is the reason that I would like to use the character "-" as a parameter. Because if the number filled on the field has the check digit it must have the character "-". Otherwise it wont have this character.

    Thanks for your help

  • Suggested answer
    Alireza Eshaghzadeh Profile Picture
    14,672 Super User 2025 Season 2 on at

    Hi Eric,

    Can you elaborate with some examples especially what should be upcoming result in ER?

  • Eric_Santos Profile Picture
    46 on at

    Hi Alireza.

    Sure.

    Example:

    I have a text field in the vendor account. in this field I need to fill a specific governmental code of the vendor. For some cases this number has a check digit separated by a hyfen. In some cases this number don't has this check digit. In ER I am building a report that retrieves this number and its possible check digit. If the governmental number provided by vendor has a check digit I need to fill it in a specific field of the report. If don't this field on the report needs to leaves in blank.

    Example with check digit.

    Governmental number: 654321-0

    Field on ER: "0"

    Example without check digit.

    Governmental number: 6543210

    Field on ER: ""

  • Verified answer
    Alireza Eshaghzadeh Profile Picture
    14,672 Super User 2025 Season 2 on at

    Hi Eric,

    Thanks for the clarification.

    Then you can use combination of 1-IF 2-Contain 3-RIGHT functions as follows:

    IF(

    CONTAINS(parameter, "-"),

    RIGHT(parameter,1),

    "")

    Or 1-IF 2-Contain 3-MID functions as follows

    IF(CONTAINS(parameter, "-"),

    MID(parameter,8,5),

    "")

    It will check and if it finds "-" on the Governmental number it will use RIGHT or MID functions, if not it will use "" (Blank).

    I hope it helps you.

  • Eric_Santos Profile Picture
    46 on at

    Hi, Alireza.

    Thank you so much man. You helped me a lot. I needed to change a little bit your formula but you was right. It's worked. Below is the formula that I used in my ER model mapping.

    IF(CONTAINS(Doc_fiscal.'find()'.ThirdPartyCCMNum,"-"), RIGHT(Doc_fiscal.'find()'.ThirdPartyCCMNum, 1

    One more time, thank you so much, Alireza.

  • Eric_Santos Profile Picture
    46 on at

    Sorry. That's the correctly formula:

    IF(CONTAINS(Doc_fiscal.'find()'.ThirdPartyCCMNum,"-"), RIGHT(Doc_fiscal.'find()'.ThirdPartyCCMNum, 1), "")

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 664 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 303 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans