You need to sign in to do that
Don't have an account?
LouisT
custom labels in helper.js list
Hi all,
I am trying to make an aura component that I can use in flow screens that display a list of countries.
So far my code looks like this:
controller:
init: function(cmp, event, helper) {
cmp.set("v.countryOptions", helper.getCountryOptions());
helper:
countryOptions: [
{'label': 'Afghanistan', value: 'AF'},
{'label': 'Aland Islands', value: 'AX'},
{'label': 'Albania', value: 'AL'},
{'label': 'Algeria', value: 'DZ'},
{'label': 'Andorra', value: 'AD'},
{'label': 'Angola', value: 'AO'},
{'label': 'Anguilla', value: 'AI'},
.... ]
Now, in the countryOptions list I would like to use custom labels for the label, like this:
{'label': {!$Label.c.england}, value: 'EN'},
However this does not work. Only values inbetween '' are accepted and when I use '{!$Label.c.UPE_grues}' I just get the literal value.
Is there anyway to use custom labels here?
Many thanks,
I am trying to make an aura component that I can use in flow screens that display a list of countries.
So far my code looks like this:
controller:
init: function(cmp, event, helper) {
cmp.set("v.countryOptions", helper.getCountryOptions());
helper:
countryOptions: [
{'label': 'Afghanistan', value: 'AF'},
{'label': 'Aland Islands', value: 'AX'},
{'label': 'Albania', value: 'AL'},
{'label': 'Algeria', value: 'DZ'},
{'label': 'Andorra', value: 'AD'},
{'label': 'Angola', value: 'AO'},
{'label': 'Anguilla', value: 'AI'},
.... ]
Now, in the countryOptions list I would like to use custom labels for the label, like this:
{'label': {!$Label.c.england}, value: 'EN'},
However this does not work. Only values inbetween '' are accepted and when I use '{!$Label.c.UPE_grues}' I just get the literal value.
Is there anyway to use custom labels here?
Many thanks,