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 :
Small and medium business | Business Central, N...
Answered

Using e.g. %1 in text fields to return dynamic values

(0) ShareShare
ReportReport
Posted on by 9,146

Hi

I know it is possible to use values such as %1 in fields to return specific values.  My problem - I can't for the life of me find material on what those values are and where they can be used.  I think I am not using the right search words.

Can someone point me to the help page that might contain this information?

Cheers

Heather

I have the same question (0)
  • Verified answer
    tanya07 Profile Picture
    1,638 on at

    Hi,

    Using  % before a no. is replaced by the value.

    Example :

    Message(‘the number is %1, 10);

    Output : 

    the number is 10

    For more examples, you can check the base code.

    Thanks,

    Tanya Kharbanda

    Don't forget to help the community by verifying the answer if your question has been answered. It will let others know that the topic has a verified answer.

  • Verified answer
    YUN ZHU Profile Picture
    95,331 Super User 2025 Season 2 on at

    Hi, In addition to what Tanya mentioned, there are some special '%1' in BC.
    Hope the following will help you too.

    1. In the Period Desc. field, specify a description that will be shown on entries for the deferral posting. You can enter the following placeholder codes for typical values, which will be inserted automatically when the period description is displayed.

      • %1 = The day number of the period posting date
      • %2 = The week number of the period posting date
      • %3 = The month number of the period posting date
      • %4 = The month name of the period posting date
      • %5 = The accounting period name of the period posting date
      • %6 = The fiscal year of the period posting date

    Example: The posting date is 02/06/2016. If you enter “Expenses deferred for %4 %6”, then the description displayed will be "Expenses deferred for February 2016".

    More details: https://docs.microsoft.com/en-us/dynamics365/business-central/finance-how-defer-revenue-expenses#to-set-up-a-deferral-template

    Thanks.

    ZHU

  • Verified answer
    Community Member Profile Picture
    on at

    Heather,

    Document No.: Simple text can be combined with the following text codes to form a number

    series:

    • %1 - The current day number

    • %2 - The current week number

    • %3 - The current month number

    • %4 - The current month name

    • %5 - The current accounting period name

    Hope this helps.

    Thanks,

    Steve

  • Heather Roggeveen Profile Picture
    9,146 on at

    Thanks for the feedback.  I will keep this list handy.  It however, did not do what I was really after it for.

    I put it into the line on a recurring sales line and was hoping it would replace with the month when the invoices were created.  It will showed as the %4 on the invoice line.  So I thought it might translate when posting, but it didn't.

    Not to worry - it would be a nice extension - will put it as an idea.

  • Suggested answer
    Community Member Profile Picture
    on at

    Heather,

    Strange. I just tested mine and it is working. For example, if you want the document number for the current months rent journal to be RENTJANUARY then enter Rent%4 in the field.

    Simple text can be combined with the following text codes to form a number series:

    • %1 – current day number eg. posting on the 10th day of the month would return 10

    • %2 – current week number eg. posting on the 5th week of the year would return 5

    • %3 – current month number eg. posting in April would return 4

    • %4 – current month name eg. a posting date of 01/04/22 would return April

    The text codes can also be used in the Description field of the journal to enter a meaningful description eg. Rent Accrual %3/22 would become Rent Accrual 1/22 if the recurring journal was posted with a posting date in January 2022.

    Is this what you did?

    Thanks,

    Steve

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,143

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,694 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,067 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans