You need to sign in to do that
Don't have an account?
deepak kumawat
Dynamically Populate Label Parameters with format()
Hi Team,
Can anyone explain, how to use "Dynamically Populate Label Parameters with format()" with an example ?
Thanks !!
Can anyone explain, how to use "Dynamically Populate Label Parameters with format()" with an example ?
Thanks !!
Output and update labels using the format() expression function.
You can provide a string with placeholders, which are replaced by the substitution values at runtime.
Add as many parameters as you need. The parameters are numbered and are zero-based. For example, if you have three parameters, they will be named {0}, {1}, and {2}, and they will be substituted in the order they're specified.
Let's look at a custom label, $Label.mySection.myLabel, with a value of Hello {0} and {1}, where $Label is the global value provider that accesses your labels.
This expression dynamically populates the placeholder parameters with the values of the supplied attributes. The label is automatically refreshed if one of the attributes value changes. For more information please check with below link.
- https://salesforce.stackexchange.com/questions/170629/is-there-a-format-function-available-in-a-lightning-component-controller-or-help
Hope this helps.Please mark this as solved if it's resolved.
Thanks,
Nagendra
Thanks !!