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 :
Microsoft Dynamics CRM (Archived)

Modify Resource String using Liquid Template

(0) ShareShare
ReportReport
Posted on by

Hi,

Is there a way where we can have a functionality similar to String.Format in Liquid? Basically I have a Resource string something like this.

{0} has records : {1}

I need to replace {0} and {1} with dynamic values using liquid tags.
So far, I have tried following things but I end up getting errors.
1) added an assign variable and then use it on the label.
{% assign my_secret_string = resx['resource Name'] | replace: '{0}', displayName | replace: '{1}', hitCount %}
here both displayname and hitcount are liquid tags. I even tried adding flower brackets around them but it still doesn't work

2)  added the liquid syntax directly to the html attribute "{%endraw%}{{ resx['resource Name'] |  replace: '{0}', 'displayName' | replace: '{1}', 'hitCount' }}{%raw%}". Even this doesn't work

Any idea on how can we work around resource strings using liquid template?

Thanks

*This post is locked for comments

I have the same question (0)

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans