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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

How to interpolate variables in strings in AL, without concatenation?

(0) ShareShare
ReportReport
Posted on by 47

I have a statement like that:

JSONStrContentOfRequest := '{"name":"'+name+'","age":"' + age + '"}';

If there's a way I can write it without doing concatenation, like if we were in Javascript, we write with Template literals `` like this:

`{"name":"${name}","age":"${age}"}`;

I have the same question (0)
  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,161 Moderator on at

    Did you study the AL data type of Json object?

    learn.microsoft.com/.../jsonobject-data-type

  • Suggested answer
    YUN ZHU Profile Picture
    98,416 Super User 2026 Season 1 on at

    Hi, As far as I know, this method is not supported in AL, you can refer to Inge's suggestion and use Json object. Erik's video below makes it easy to understand.

    https://www.youtube.com/watch?v=so7_bOxp9V4

    https://www.youtube.com/watch?v=BpLJy6HwXyo

    pastedimage1664322908407v1.png

    Hope this helps.

    Thanks.

    ZHU

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,958 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,101 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 959 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans