Answers > Module 21

Hi there,
I’m having trouble with compiling after step 18 - I’m getting an error message on my first line of my component.js card - I get the squiggly red lines under the first line of code: {{> cards/card_component componentName=‘joboverride’ }}, where the squiggly lines are under componentName and when I look at the error message, it tells me I need a ;

The code won’t compile when I commit and I’m assuming it’s because of this. I can’t seem to figure out what is wrong! help!

1 Like

Hi Carrie,

The red squiggly line you’re seeing under componentName is actually expected and is not causing the issue. The error is actually coming from the subtitle field:

  • You won’t need the Formatter.joinList() function here. This function is used to display text list fields. For example, since the Benefits field is a list of single-line text, the function Formatter.joinList(profile.c_benefits, ', ' would produce the list [benefit1], [benefit2], [benefit3]. The job department and employment type fields are not list types.

  • Employment Type is a built-in field on the job entity type so you won’t need the c_ at the beginning of it which denotes a custom field. To double check the API names of fields, you can go to Account Settings > Manage Entity Types and look at the list of fields listed for the relevant entity type. The API name is listed under the field name. From the screenshot, you’ll want to use profile.c_jobDepartment and profile.employmentType.

  • Since we’re aiming to get “[jobDepartment] | [employmentType]” we need to make sure there is a space on either side of | . To do this, you’ll need to put spaces within the quotes.

Putting all of that together will give you:
subtitle: profile.c_jobDepartment + ' | ' + profile.c_employmentType,

Hope that makes sense! Also remember to complete the rest of the steps for the challenge before submitting.